/* Mobile-First CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

:root {
    --primary: #00ffcc;
    --secondary: #00ccff;
    --dark: #121212;
    --light: #1e1e1e;
    --white: #ffffff;
    --text: #e0e0e0;
    --text-muted: rgba(224, 224, 224, 0.6);
    --border: rgba(255, 255, 255, 0.1);
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--dark);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header - Mobile First */
.header {
    background: var(--light);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 100%;
}

.back-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.back-icon:active {
    background: var(--primary);
    color: var(--dark);
    transform: scale(0.95);
}

/* Hero Section */
.hero {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main Content */
.main-content {
    padding: 20px 16px;
    max-width: 100%;
}

/* Game Title Section */
.game-title-section {
    margin-bottom: 24px;
}

.game-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.game-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    border: 3px solid var(--primary);
    object-fit: cover;
    flex-shrink: 0;
}

.game-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.game-title-section h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
    line-height: 1.3;
    margin-top: 0;
}

.game-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
}

/* Get Buttons */
.get-section {
    text-align: center;
    margin: 20px 0 32px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.get-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    padding: 12px 30px;
    background: var(--primary);
    color: var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: background 0.3s ease;
    margin: 0;
    cursor: pointer;
    border: none;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.get-btn:hover {
    background: var(--secondary);
}

.get-btn:active {
    transform: scale(0.98);
}

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

/* App Information Section */
.app-info-section {
    background: var(--light);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
}

#getItOn {
    color: var(--primary);
    font-weight: 600;
}

/* Rating Section */
.rating-section {
    background: var(--light);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.rating-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.stars-container {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.star-icon {
    font-size: 28px;
    color: #ffd700;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.star-icon:active {
    transform: scale(1.2);
}

.rating-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.rating-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.votes-count {
    font-size: 14px;
    color: var(--text-muted);
}

/* Features Section */
.features-section {
    margin-bottom: 24px;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--light);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.feature-list li i {
    color: var(--primary);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.feature-list li span {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

/* Screenshots Section */
.screenshots-section {
    margin-bottom: 24px;
}

.screenshot-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--dark);
}

.screenshot-grid::-webkit-scrollbar {
    height: 4px;
}

.screenshot-grid::-webkit-scrollbar-track {
    background: var(--dark);
    border-radius: 2px;
}

.screenshot-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

.screenshot {
    width: 280px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    scroll-snap-align: start;
    flex-shrink: 0;
    border: 1px solid var(--border);
    pointer-events: none;
    user-select: none;
}

/* Footer */
.footer {
    background: var(--light);
    padding: 24px 16px;
    margin-top: 32px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-section h3 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: inline-block;
    padding: 4px 0;
}

.footer-links a:active {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.social-links a:active {
    background: var(--primary);
    color: var(--dark);
    transform: scale(0.95);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--light);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    max-width: 90%;
    text-align: center;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-notification i {
    color: var(--primary);
    font-size: 18px;
}


/* Tablet and Desktop Styles */
@media (min-width: 768px) {
    .main-content {
        max-width: 600px;
        margin: 0 auto;
        padding: 24px 20px;
    }

    .header-content {
        max-width: 600px;
        margin: 0 auto;
    }

    .game-logo {
        width: 100px;
        height: 100px;
    }

    .hero {
        height: 300px;
    }

    .game-title-section h1 {
        font-size: 24px;
    }

    .game-subtitle {
        font-size: 13px;
    }

    .get-section {
        margin: 20px 0 32px;
        max-width: 100%;
    }

    .get-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        margin: 0;
    }

    .info-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .info-item {
        padding-bottom: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        padding-right: 20px;
    }

    .info-item:nth-child(2n) {
        border-right: none;
        padding-right: 0;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-around;
        max-width: 600px;
        margin: 0 auto 20px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        max-width: 800px;
    }

    .header-content {
        max-width: 800px;
    }

    .hero {
        height: 400px;
    }
}

/* Prevent text selection during scroll */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

/* Content Locker Container - Stable, No Glitches */
.content-locker-container {
    display: none !important;
    /* Container is not used for display - Content locker handles its own overlay */
}

.content-locker-wrapper {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    transition: none !important;
    animation: none !important;
}

/* Prevent glitches on AdBlueMedia injected content - Stability fixes */
div[id*="abm"],
div[id*="adbluemedia"],
div[class*="abm"],
div[class*="adbluemedia"],
div[style*="z-index"] {
    /* Force stable rendering - prevent glitches */
    will-change: auto !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    /* Prevent layout shifts */
    contain: layout style paint !important;
    /* No transitions or animations that cause glitches */
    transition: none !important;
    animation: none !important;
    -webkit-transition: none !important;
    -webkit-animation: none !important;
    -moz-transition: none !important;
    -moz-animation: none !important;
    -o-transition: none !important;
    -o-animation: none !important;
}

/* Ensure high z-index overlays are stable */
div[style*="z-index"] {
    /* Additional stability for high z-index elements */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    /* Prevent scroll glitches */
    overscroll-behavior: contain !important;
    -webkit-overscroll-behavior: contain !important;
    /* Prevent any movement or glitches */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    /* Force stable rendering */
    contain: layout style paint !important;
    isolation: isolate !important;
}

/* Prevent glitches on iframes */
iframe {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    /* Stability fixes for iframes */
    will-change: auto !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Prevent iframe glitches */
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
}

/* Prevent content locker glitches - Force GPU acceleration and stability */
div[id*="abm"] *,
div[id*="adbluemedia"] *,
div[class*="abm"] *,
div[class*="adbluemedia"] * {
    will-change: auto !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    transition: none !important;
    animation: none !important;
    -webkit-transition: none !important;
    -webkit-animation: none !important;
    /* Prevent layout shifts */
    contain: layout style paint !important;
    /* Prevent any movement */
    margin: 0 !important;
    padding: 0 !important;
}

/* Additional stability for all content locker elements - Maximum Stability */
div[id*="abm"],
div[id*="adbluemedia"],
div[class*="abm"],
div[class*="adbluemedia"] {
    /* Force stable positioning - prevent any movement */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    /* Prevent any reflow or repaint */
    contain: layout style paint !important;
    isolation: isolate !important;
    /* Stable overflow handling */
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    -webkit-overscroll-behavior: contain !important;
    /* Force GPU acceleration for stability */
    will-change: auto !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    /* Prevent any transitions or animations */
    transition: none !important;
    animation: none !important;
    -webkit-transition: none !important;
    -webkit-animation: none !important;
    -moz-transition: none !important;
    -moz-animation: none !important;
    -o-transition: none !important;
    -o-animation: none !important;
    /* Lock z-index */
    z-index: 99999 !important;
    /* Prevent pointer events from causing reflows */
    pointer-events: auto !important;
}

