html, body {
    scrollbar-width: thin;
    scrollbar-color: #2563eb #f1f1f1;
    -webkit-tap-highlight-color: transparent;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}
button, a {
    outline: none;
}
.bg-gradient {
    background: #ffffff;
    z-index: 10;
}
.container {
    max-width: 1280px;
    width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: auto;
    margin-right: auto;
}
.game-preview-container {
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1000px;
    position: relative;
}
.app-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.app-logo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.app-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #1f2937;
}
.game-preview-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.game-info-container {
    display: flex;
    overflow-x: auto;
    gap: 1.25rem;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.game-info-container::-webkit-scrollbar {
    display: none;
}
.game-info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 100px;
    flex-shrink: 0;
    scroll-snap-align: start;
    text-align: center;
}
.game-info-item i {
    color: #2563eb;
    font-size: 1.5rem;
}
.game-info-item span {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}
.game-info-item .divider {
    color: #4b5563;
    font-size: 1rem;
    margin: 0 0.75rem;
}
.btn-download, .telegram-button, .steps-container .button {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 24px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
    transition: all 0.3s ease, opacity 0.2s ease, transform 0.1s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}
.btn-download:hover, .telegram-button:hover, .steps-container .button:hover {
    background: linear-gradient(135deg, #22c55e, #15803d);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn-download:not(:hover), .telegram-button:not(:hover), .steps-container .button:not(:hover) {
    transform: scale(1);
}
.btn-download:active, .telegram-button:active, .steps-container .button:active {
    opacity: 0.7;
}
.telegram-button {
    background: transparent;
    border: 2px solid #0088cc;
    color: #0088cc;
}
.telegram-button:hover {
    background: transparent;
    border: 2px solid #0088cc;
    color: #0088cc;
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.steps-container .button {
    background: transparent;
    border: 2px solid #0088cc;
    color: #0088cc;
}
.telegram-button i, .steps-container .button i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}
.loading-spinner {
    display: none;
}
.loading-spinner.active {
    display: flex;
}
.error-message {
    color: #dc2626;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    margin: 1rem 0;
}
.similar-apps-container, .suggested-apps-container {
    max-width: 100%;
    width: 100%;
    margin-bottom: 2rem;
}
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-title h2 {
    position: relative;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    padding-bottom: 0.5rem;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}
.section-title h2:hover::after {
    width: 100%;
}
.section-title a {
    color: #2563eb;
    transition: color 0.3s ease, transform 0.3s ease;
}
.section-title a:hover {
    color: #1e40af;
    transform: scale(1.1);
}
.section-title i {
    font-size: 1.5rem;
}
.similar-apps-wrapper, .suggested-apps-wrapper {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.similar-apps-wrapper::-webkit-scrollbar, .suggested-apps-wrapper::-webkit-scrollbar {
    display: none;
}
.app-card {
    display: flex;
    flex-direction: column; /* Stack image and name vertically */
    align-items: center; /* Center content horizontally */
    gap: 0.5rem; /* Reduced gap for tighter vertical spacing */
    width: calc(14.285% - 1.5rem); /* Maintain 7 apps per line on PC */
    max-width: 140px; /* Match image width for compact layout */
    flex-shrink: 0;
    transition: transform 0.3s ease;
    scroll-snap-align: start;
    cursor: pointer;
    padding: 0.5rem; /* Add padding for professional look */
    border-radius: 12px; /* Subtle card effect */
    background: #ffffff; /* White background for card */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
}
.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Enhanced shadow on hover */
}
.app-card .game-image {
    width: 120px; /* Slightly smaller for better fit */
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.app-card h3 {
    font-size: 0.9rem;
    font-weight: 600; /* Bolder for professional look */
    color: #1f2937;
    margin: 0;
    text-align: center; /* Center the name */
    width: 100%; /* Full width for centering */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; /* Allow wrapping for longer names */
    line-height: 1.2; /* Better readability */
    padding: 0 0.5rem; /* Padding for spacing */
}
.steps-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.steps-container h2 {
    font-size: 1.75rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1.25rem;
}
.steps-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}
.steps-container p {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.steps-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}
.steps-container img:hover {
    transform: scale(1.02);
    cursor: pointer;
}
.steps-container a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}
.steps-container a:hover {
    color: #1e40af;
    text-decoration: underline;
}
.steps-container .highlight {
    background-color: #22c55e;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}
/* Iframe Container Styling */
.iframe-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: none; /* Hidden by default */
}
.iframe-container.active {
    display: block;
}
.iframe-container iframe {
    width: 100%;
    height: 80vh; /* Full viewport height minus header */
    min-height: 600px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
    .game-preview-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    .app-header {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    .app-logo {
        width: 100px;
        height: 100px;
    }
    .app-title {
        font-size: 1.5rem;
    }
    .game-info-container {
        gap: 1rem;
    }
    .game-info-item span {
        font-size: 0.9rem;
    }
    .game-info-item i {
        font-size: 1.25rem;
    }
    .game-info-item .divider {
        font-size: 0.9rem;
    }
    .btn-download, .telegram-button, .steps-container .button {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    .telegram-button i, .steps-container .button i {
        font-size: 1rem;
    }
    .section-title h2 {
        font-size: 1.25rem;
    }
    .section-title i {
        font-size: 1.25rem;
    }
    .app-card {
        flex-direction: column; /* Stack vertically */
        align-items: center; /* Center content */
        gap: 0.5rem;
        width: calc(33.333% - 1rem); /* 3 apps per line */
        max-width: 120px; /* Match image width */
        padding: 0.5rem;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    .app-card .game-image {
        width: 100px;
        height: 100px;
    }
    .app-card h3 {
        font-size: 0.85rem;
        text-align: center;
        width: 100%;
        white-space: normal;
        line-height: 1.2;
        padding: 0 0.5rem;
    }
    .steps-container {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    .steps-container h2 {
        font-size: 1.5rem;
    }
    .steps-container h3 {
        font-size: 1rem;
    }
    .steps-container p {
        font-size: 0.9rem;
    }
    .iframe-container iframe {
        height: 60vh;
        min-height: 400px;
    }
}
@media (max-width: 480px) {
    .game-preview-container {
        padding: 1rem;
        margin: 1rem auto;
    }
    .app-logo {
        width: 80px;
        height: 80px;
    }
    .app-title {
        font-size: 1.25rem;
    }
    .game-info-container {
        gap: 0.75rem;
    }
    .game-info-item span {
        font-size: 0.85rem;
    }
    .game-info-item i {
        font-size: 1rem;
    }
    .game-info-item .divider {
        font-size: 0.85rem;
    }
    .btn-download, .telegram-button, .steps-container .button {
        padding: 0.5rem 1.25rem;
        font-size: 0.9rem;
    }
    .telegram-button i, .steps-container .button i {
        font-size: 0.9rem;
    }
    .section-title h2 {
        font-size: 1.1rem;
    }
    .section-title i {
        font-size: 1.1rem;
    }
    .app-card {
        flex-direction: column; /* Stack vertically */
        align-items: center; /* Center content */
        gap: 0.5rem;
        width: calc(33.333% - 0.75rem); /* 3 apps per line */
        max-width: 100px; /* Match image width */
        padding: 0.5rem;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    .app-card .game-image {
        width: 80px;
        height: 80px;
    }
    .app-card h3 {
        font-size: 0.8rem;
        text-align: center;
        width: 100%;
        white-space: normal;
        line-height: 1.2;
        padding: 0 0.5rem;
    }
    .steps-container {
        padding: 1rem;
        margin: 1rem auto;
    }
    .steps-container h2 {
        font-size: 1.25rem;
    }
    .steps-container h3 {
        font-size: 0.9rem;
    }
    .steps-container p {
        font-size: 0.8rem;
    }
    .iframe-container iframe {
        height: 50vh;
        min-height: 300px;
    }
}
@keyframes fadeIn {
    0% { opacity: 0; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}
.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}