* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* ========================================
   MOBILE-LOCKED SCALING
   Always render like a phone (~390px), even on desktop
   ======================================== */
:root {
    --phone-width: 390px;
    --base-viewport: 375;
    --max-viewport: 390;

    /* Fixed mobile font sizes (no vw growth) */
    --fs-xs: 0.65rem;
    --fs-sm: 0.75rem;
    --fs-base: 0.9rem;
    --fs-md: 1.05rem;
    --fs-lg: 1.35rem;
    --fs-xl: 1.6rem;
    --fs-xxl: 1.9rem;

    /* Soft Pink Color */
    --pink-soft: rgba(255, 20, 147, 0.6);
    --pink-border: rgba(255, 20, 147, 0.4);

    /* Fixed mobile spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.4rem;
    --space-md: 0.65rem;
    --space-lg: 1rem;
    --space-xl: 1.25rem;
    --space-xxl: 1.75rem;

    /* Fixed gaps */
    --gap-xs: 0.2rem;
    --gap-sm: 0.35rem;
    --gap-md: 0.5rem;
    --gap-lg: 0.75rem;

    /* Fixed radius */
    --radius-sm: 0.65rem;
    --radius-md: 0.9rem;
    --radius-lg: 1.15rem;
    --radius-xl: 1.4rem;

    /* Fixed icons */
    --icon-sm: 1.15rem;
    --icon-md: 1.4rem;
    --icon-lg: 1.8rem;

    /* Button minimum sizes (accessibility) */
    --btn-min-height: 44px;
    --btn-min-width: 44px;
}

/* Age Verification Modal Styles */
.age-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.age-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.age-modal-content {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 25px;
    padding: 40px 30px;
    text-align: center;
    max-width: min(390px, 92vw);
    width: 100%;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(220, 20, 60, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(220, 20, 60, 0.2);
    animation: ageModalSlideIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.age-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc143c, #8b008b, #ff1493, #9400d3, #dc143c);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes ageModalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.age-modal-header {
    margin-bottom: 30px;
}

.age-warning-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: ageWarningPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(220, 20, 60, 0.8));
}

@keyframes ageWarningPulse {
    0%, 100% { 
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(220, 20, 60, 0.8));
    }
    50% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(220, 20, 60, 1));
    }
}

.age-title {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #dc143c, #ff1493, #8b008b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.age-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #b0b0b0;
    font-weight: 400;
    margin-bottom: 0;
    opacity: 0.9;
}

.age-modal-body {
    text-align: center;
}

.age-warning-text {
    margin-bottom: 30px;
    padding: 0 10px;
}

.age-warning-text p {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #e0e0e0;
    line-height: 1.6;
    margin-bottom: 15px;
    opacity: 0.9;
}

.age-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.age-btn {
    width: 100%;
    padding: 18px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.age-btn-confirm {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 50%, #00aa55 100%);
    color: #000000;
    box-shadow: 
        0 8px 20px rgba(0, 255, 136, 0.4),
        0 0 20px rgba(0, 204, 106, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: confirmGlow 3s ease-in-out infinite;
}

.age-btn-deny {
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 50%, #ff2f3a 100%);
    color: #ffffff;
    box-shadow: 
        0 8px 20px rgba(255, 71, 87, 0.4),
        0 0 20px rgba(255, 55, 66, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: denyGlow 3s ease-in-out infinite;
}

.age-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.age-btn-confirm:hover {
    box-shadow: 
        0 12px 25px rgba(0, 255, 136, 0.6),
        0 0 25px rgba(0, 204, 106, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.age-btn-deny:hover {
    box-shadow: 
        0 12px 25px rgba(255, 71, 87, 0.6),
        0 0 25px rgba(255, 55, 66, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.age-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.age-btn-icon {
    font-size: 18px;
    animation: iconBounce 2s ease-in-out infinite;
}

.age-btn-text {
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes confirmGlow {
    0%, 100% { 
        box-shadow: 
            0 8px 20px rgba(0, 255, 136, 0.4),
            0 0 20px rgba(0, 204, 106, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 12px 25px rgba(0, 255, 136, 0.6),
            0 0 30px rgba(0, 204, 106, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

@keyframes denyGlow {
    0%, 100% { 
        box-shadow: 
            0 8px 20px rgba(255, 71, 87, 0.4),
            0 0 20px rgba(255, 55, 66, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 12px 25px rgba(255, 71, 87, 0.6),
            0 0 30px rgba(255, 55, 66, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.1); }
}

.age-disclaimer {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.age-disclaimer small {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: #a0a0a0;
    line-height: 1.4;
    opacity: 0.8;
}

/* Mobile optimizations for age verification */
@media (max-width: 480px) {
    .age-modal-content {
        padding: 30px 20px;
        max-width: 380px;
        border-radius: 20px;
    }
    
    .age-title {
        font-size: 24px;
    }
    
    .age-subtitle {
        font-size: 14px;
    }
    
    .age-warning-text p {
        font-size: 13px;
    }
    
    .age-btn {
        padding: 16px 20px;
        font-size: 15px;
        min-height: 52px;
    }
    
    .age-warning-icon {
        font-size: 50px;
    }
}

@media (max-width: 360px) {
    .age-modal-content {
        padding: 25px 15px;
        max-width: 320px;
    }
    
    .age-title {
        font-size: 22px;
    }
    
    .age-btn {
        padding: 14px 18px;
        font-size: 14px;
        min-height: 48px;
    }
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
}

.loading-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: var(--phone-width);
    height: 100%;
    max-height: 100vh;
    background: #050505;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 80px rgba(0, 0, 0, 0.65);
}

.loading-photos-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #0a0a0a;
}

.loading-photos-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: none;
    transition: opacity 1.4s ease-in-out;
    will-change: opacity;
    pointer-events: none;
}

.loading-photos-bg img.is-active {
    opacity: 1;
    animation: none;
}

.loading-veil {
    display: none;
}

.loading-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: left;
    color: white;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: none;
    margin: auto;
    width: auto;
    max-width: 220px;
    min-height: 0;
}

.loading-logo {
    margin: 0;
    flex-shrink: 0;
}

.loading-logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    animation: pulse 2s infinite;
    display: block;
}

.loading-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.loading-text {
    font-size: 9px;
    font-weight: 200;
    letter-spacing: 0.04em;
    margin: 0;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.2;
    white-space: nowrap;
    -webkit-text-size-adjust: 100%;
}

.loading-bar {
    width: 100%;
    min-width: 120px;
    max-width: 140px;
    height: 3px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    overflow: hidden;
    margin: 0;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f);
    border-radius: 2px;
    transition: width 0.35s ease;
    animation: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

html, body {
    height: 100vh;
    max-height: 100vh;
    overflow: auto; /* allow scroll */
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Keep UI RTL but force scrollbar to the right */
html {
    direction: ltr;
}

body {
    direction: rtl;
    font-family: 'Poppins', 'Outfit', sans-serif;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(25px);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: auto; /* allow scroll */
    /* Mobile optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
    /* Prevent text selection and copy */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Site-themed scrollbars */
html,
body,
.ai-design-modal,
.ai-design-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 20, 147, 0.65) rgba(255, 255, 255, 0.06);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.ai-design-modal::-webkit-scrollbar,
.ai-design-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.ai-design-modal::-webkit-scrollbar-track,
.ai-design-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.ai-design-modal::-webkit-scrollbar-thumb,
.ai-design-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff69b4, #ff1493);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 36px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.ai-design-modal::-webkit-scrollbar-thumb:hover,
.ai-design-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff8cc8, #ff2e9f);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.ai-design-modal::-webkit-scrollbar-corner,
.ai-design-content::-webkit-scrollbar-corner {
    background: transparent;
}

/* Background effects removed - static black background only */

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* Background slide animation removed */

.container {
    width: 100%;
    max-width: var(--phone-width);
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.app-card {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    border: none;
    border-radius: 0;
    padding: 30px 25px;
    text-align: center;
    box-shadow: none;
    position: relative;
    overflow: visible;
    animation: cardGlow 3s ease-in-out infinite alternate;
    width: 100%;
    max-width: var(--phone-width);
    margin: 0 auto;
    /* Mobile optimizations */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    /* Custom scrollbar for better look */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-card::-webkit-scrollbar {
    display: none;
}

.download-banner {
    margin: -30px -25px 18px;
    width: calc(100% + 50px);
    max-width: none;
    line-height: 0;
    overflow: hidden;
}

.download-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
}

@keyframes cardGlow {
    0% { box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(220, 20, 60, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 20px rgba(220, 20, 60, 0.2); }
    100% { box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(220, 20, 60, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 50px rgba(220, 20, 60, 0.5); }
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc143c, #8b008b, #ff1493, #9400d3, #dc143c);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* App Header Layout */
.app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.app-icon {
    margin-bottom: 0;
    flex-shrink: 0;
}

.app-title-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.simple-title {
    font-size: 20px;
    color: #ffffff;
    text-align: left;
    margin-bottom: 0px;
    font-weight: normal;
}

.app-copyright {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    color: #ffffff;
    text-align: left;
    margin-top: 2px;
    margin-bottom: 0px;
    font-weight: 300;
    opacity: 0.4;
}

.app-purchases {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    color: #ffffff;
    text-align: left;
    margin-bottom: 0;
    font-weight: 300;
    opacity: 0.4;
}

.icon-placeholder {
    width: 70px;
    height: 70px;
    padding: 0;
    background: #080808;
    border: 1px solid rgba(255, 20, 147, 0.55);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: 0 auto;
    box-shadow: none;
    position: relative;
    animation: iconPulse 2s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Mobile touch optimization */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    overflow: hidden;
    box-sizing: border-box;
}

.app-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    display: block;
    background: #050505;
}

.fallback-icon {
    display: none;
    font-size: 42px;
}

.icon-placeholder:hover {
    transform: scale(1.05);
    box-shadow: none;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.app-title {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #dc143c, #ff1493, #8b008b, #9400d3);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: textGradient 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(220, 20, 60, 0.5);
    letter-spacing: -0.5px;
    /* Mobile text optimization */
    word-break: keep-all;
    hyphens: none;
}

@keyframes textGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.app-info {
    margin-bottom: 20px;
}

.version-size {
    margin-bottom: 15px;
    color: #e5e7eb;
    font-size: 11px;
    font-weight: 400;
    font-family: 'Outfit', sans-serif;
    opacity: 0.7;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
    letter-spacing: 0.5px;
}

.separator {
    margin: 0 10px;
    color: #ff1493;
}

.stats-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding: 0 5px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.stat-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.stat-number {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.stat-icon {
    font-size: 12px;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}

.stat-label {
    font-size: 9px;
    color: #a0a0a0;
    font-weight: 300;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.2px;
    opacity: 0.6;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 25px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 8px;
}


.install-btn {
    width: 100%;
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 50%, #ff6b35 100%);
    background-size: 200% 100%;
    border: none;
    border-radius: 16px;
    padding: 18px 24px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 20px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 140, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-top: 16px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    animation: subtleGlow 4s ease-in-out infinite, backgroundFlow 6s linear infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-transform: uppercase;
    /* Mobile touch optimization */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 56px;
    user-select: none;
}

/* Install button emoji spacing */
/* .install-emoji removed */

.install-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.install-btn:hover::before {
    left: 100%;
}

.install-btn:hover {
    transform: translateY(-2px) scale(1.02);
    background-position: 100% 0;
    box-shadow: 
        0 12px 25px rgba(255, 215, 0, 0.7),
        0 0 25px rgba(255, 140, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.install-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.install-text, .install-icon {
    position: relative;
    z-index: 2;
}

@keyframes subtleGlow {
    0%, 100% { 
        box-shadow: 
            0 8px 20px rgba(220, 20, 60, 0.5),
            0 0 20px rgba(139, 0, 139, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 12px 25px rgba(220, 20, 60, 0.7),
            0 0 30px rgba(139, 0, 139, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

@keyframes backgroundFlow {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}


.download-icon {
    font-size: 20px;
    animation: iconBounce 3s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.05); }
}

.security-note {
    color: #ff1493;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-shadow: 0 0 15px rgba(255, 20, 147, 0.7);
    animation: securityPulse 2s ease-in-out infinite;
}

@keyframes securityPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.age-restriction {
    color: #dc143c;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-shadow: 0 0 15px rgba(220, 20, 60, 0.8);
    animation: ageWarning 2s ease-in-out infinite;
    margin-top: 10px;
    padding: 10px 20px;
    background: rgba(220, 20, 60, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(220, 20, 60, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes ageWarning {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Platforms Section */
.platforms {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding: 0 20px;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: rgba(139, 0, 139, 0.1);
    border: 1px solid rgba(139, 0, 139, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 60px;
}

.platform-item:hover {
    background: rgba(139, 0, 139, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 139, 0.4);
}

.platform-icon {
    font-size: 18px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 6px rgba(139, 0, 139, 0.6));
}

.platform-text {
    font-size: 10px;
    color: #a0a0a0;
    font-weight: 300;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.2px;
    opacity: 0.8;
}

/* Mobile-first responsive design */
@media (max-width: 480px) {
    body {
        padding: 8px;
        height: auto;
        min-height: 100vh;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        align-items: flex-start;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(25px);
    }
    
    .container {
        max-width: 380px;
        padding: 0;
        overflow: visible;
    }
    
    .app-card {
        padding: 25px 20px;
        border-radius: 20px;
        width: 100%;
        overflow: visible;
        border: none;
        box-shadow: none;
    }
    
    .app-title {
        font-size: 26px;
        margin-bottom: 15px;
    }
    
    .icon-placeholder {
        width: 75px;
        height: 75px;
        font-size: 38px;
    }
    
    .app-description {
        padding: 20px 18px;
        margin-bottom: 25px;
    }
    
    .app-description p {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .install-btn {
        font-size: 18px;
        padding: 20px 28px;
        min-height: 58px;
        letter-spacing: 1px;
        border-radius: 16px;
        /* Auto-glow on mobile without hover */
        animation: mobileAutoGlow 3s ease-in-out infinite, backgroundFlow 5s linear infinite;
        box-shadow: 
            0 10px 25px rgba(255, 215, 0, 0.6),
            0 0 25px rgba(255, 140, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    
    .install-icon {
        font-size: 19px;
    }
    
    
    .game-description-text {
        margin-top: 20px;
        padding: 0 15px;
    }
    
    .description-title {
        font-size: 14px;
        margin-bottom: 12px;
        letter-spacing: 0.3px;
    }
    
    .description-content {
        font-size: 12px;
        line-height: 1.5;
        max-width: 100%;
    }
    
    .stat-item, .rating {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .version-size {
        font-size: 10px;
    }
}

@keyframes mobileAutoGlow {
    0%, 100% { 
        box-shadow: 
            0 10px 25px rgba(220, 20, 60, 0.6),
            0 0 25px rgba(139, 0, 139, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 
            0 15px 35px rgba(220, 20, 60, 0.8),
            0 0 35px rgba(139, 0, 139, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        transform: scale(1.01);
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .container {
        max-width: 320px;
    }
    
    .app-card {
        padding: 20px 15px;
    }
    
    .app-title {
        font-size: 24px;
    }
    
    .icon-placeholder {
        width: 70px;
        height: 70px;
        font-size: 35px;
    }
    
    .download-btn {
        font-size: 15px;
        padding: 16px 20px;
        min-height: 52px;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        padding: 10px;
    }
    
    .app-card {
        padding: 20px;
    }

    .download-banner {
        margin: -20px -20px 14px;
        width: calc(100% + 40px);
    }
    
    .app-header {
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .app-icon {
        margin-bottom: 0;
    }
    
    .app-title {
        font-size: 20px;
        margin-bottom: 1px;
    }
    
    .app-copyright {
        font-size: 11px;
        margin-bottom: 0px;
    }
    
    .app-purchases {
        font-size: 11px;
    }
    
    .icon-placeholder {
        width: 65px;
        height: 65px;
        font-size: 32px;
    }
    
    .app-header {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .app-title {
        font-size: 18px;
        margin-bottom: 1px;
    }
    
    .app-copyright {
        font-size: 10px;
        margin-bottom: 0px;
    }
    
    .app-purchases {
        font-size: 10px;
    }
    
    .app-description {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .stats {
        gap: 8px;
    }
}

/* Loading animation for install button */
.install-btn.loading {
    position: relative;
    color: transparent;
}

.install-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Video Section Styles */
.video-section {
    margin-top: 25px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    border: none;
    position: relative;
    overflow: hidden;
}


.video-container {
    position: relative;
    width: 100%;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
}

.video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
    border-radius: 2px 0 0 0;
}

.video-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    border-right: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
    border-radius: 0 0 2px 0;
}

.game-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: transparent;
    cursor: pointer;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.video-play-button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.video-play-button.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

.video-play-button:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.play-icon {
    color: white;
    font-size: 16px;
    margin-left: 2px;
}


/* Video loading state */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff1493;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #ff1493;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Integrated Screenshots Gallery - No borders, full width */
.screenshots-section-integrated {
    margin: 20px 0;
    width: 100%;
    position: relative;
}

.gallery-container-integrated {
    position: relative;
    width: 100%;
}

.gallery-wrapper-integrated {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    border-radius: 0;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.gallery-wrapper-integrated:active {
    cursor: grabbing;
}

.gallery-slider-integrated {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    /* Enhanced mobile performance */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide.fade-out {
    opacity: 0.7;
    transform: scale(0.98);
}

.gallery-slide.fade-in {
    opacity: 1;
    transform: scale(1);
}

.gallery-slide img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border-radius: 12px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
    display: block;
    margin: 0 auto;
}

.gallery-slide:hover img {
    transform: scale(1.02) translateY(-1px);
    box-shadow: 
        0 10px 35px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 15px rgba(255, 255, 255, 0.1);
    filter: brightness(1.08) contrast(1.12) saturate(1.15);
}

.gallery-slide {
    position: relative;
    overflow: hidden;
}

.gallery-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.gallery-slide:hover::before {
    opacity: 1;
}

.gallery-dots-integrated {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
}

.gallery-dot::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
}

.gallery-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.gallery-dot:hover::before {
    opacity: 0.2;
}

.gallery-dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.3);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.gallery-dot.active::before {
    opacity: 0.3;
}

/* Gallery loading animation */
.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 320px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    gap: 15px;
}

.gallery-loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.gallery-loading::after {
    content: 'Loading screenshots...';
    font-size: 12px;
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Detailed Ratings Section */
.detailed-ratings {
    margin-top: 40px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    border: none;
    position: relative;
    overflow: visible;
}


.ratings-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
}

.rating-circle {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(15px);
    animation: liquidGlass 4s ease-in-out 3;
    overflow: hidden;
}

.rating-circle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: liquidShine 3s ease-in-out 3;
    z-index: 1;
}

.rating-circle::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rating-progress {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.3s ease;
}

.rating-circle:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.2);
}

.rating-circle:hover::after {
    opacity: 1;
}

.rating-number {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 2px;
}

.rating-label {
    font-family: 'Poppins', sans-serif;
    font-size: 9px;
    font-weight: 500;
    color: #a0a0a0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.8;
}


.rating-circle.animate-in {
    animation: slideInUp 0.6s ease-out forwards;
}

@keyframes slideInUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes liquidGlass {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
        backdrop-filter: blur(15px);
    }
    50% {
        transform: scale(1.01);
        filter: brightness(1.05);
        backdrop-filter: blur(20px);
    }
}

@keyframes liquidShine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}


/* Comments Section */
.comments-section {
    margin-top: 40px;
    padding: 0;
    background: transparent;
    overflow: hidden;
}

.comments-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
    -webkit-mask: linear-gradient(90deg, transparent 0%, black 20%, black 80%, transparent 100%);
}

.comments-track {
    display: flex;
    gap: 20px;
    animation: scrollComments 50s linear infinite;
    width: max-content;
    will-change: transform;
}

.comment-item {
    flex-shrink: 0;
    width: 280px;
    background: transparent;
    border-radius: 12px;
    padding: 15px;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.comment-item:hover {
    transform: translateY(-2px);
    border-bottom-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.comment-avatar {
    font-size: 24px;
    margin-bottom: 10px;
    text-align: center;
}

.comment-content {
    text-align: center;
}

.comment-name {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.comment-text {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #e0e0e0;
    line-height: 1.4;
    margin-bottom: 8px;
    opacity: 0.9;
}

.comment-rating {
    font-size: 12px;
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

@keyframes scrollComments {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Footer Section */
.footer-section {
    margin-top: 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    text-align: center;
    max-width: 100%;
}

.footer-text {
    margin-bottom: 15px;
}

.footer-text p {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: #a0a0a0;
    font-weight: 300;
    line-height: 1.4;
    margin-bottom: 5px;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links span {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    color: #ffffff;
    font-weight: 400;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.footer-links span:hover {
    opacity: 0.9;
}

/* Feed video on download page */
.feed-video-section {
    margin: 18px -25px 8px;
    width: calc(100% + 50px);
    line-height: 0;
    overflow: hidden;
    border-radius: 0;
    background: #000;
}

.feed-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

.promo-video-section {
    margin: 14px -25px 10px;
    width: calc(100% + 50px);
    line-height: 0;
    overflow: hidden;
    background: #000;
}

.promo-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

@media (max-width: 480px) {
    .feed-video-section {
        margin: 14px -20px 6px;
        width: calc(100% + 40px);
    }

    .promo-video-section {
        margin: 12px -20px 8px;
        width: calc(100% + 40px);
    }
}

/* Game Description Text */
.game-description-text {
    margin-top: 20px;
    margin-bottom: 4px;
    text-align: center;
    padding: 0 20px;
}

.description-title {
    font-family: 'Outfit', 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    line-height: 1.3;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description-content {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #b0b0b0;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 500px;
    letter-spacing: 0.2px;
    opacity: 0.9;
}

/* Mobile optimizations for video and gallery */
@media (max-width: 480px) {
    .video-section {
        margin-top: 20px;
        padding: 15px;
    }
    
    .video-play-button {
        width: 45px;
        height: 45px;
    }
    
    .play-icon {
        font-size: 15px;
    }
    
    
    .video-wrapper {
        padding-bottom: 56.25%; /* Keep 16:9 ratio */
        border-radius: 6px;
    }
    
    .video-wrapper::before,
    .video-wrapper::after {
        width: 15px;
        height: 15px;
        border-width: 1.5px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .play-icon {
        font-size: 24px;
    }
    
    .video-info h4 {
        font-size: 16px;
    }
    
    .video-info p {
        font-size: 12px;
    }
    
    .screenshots-section {
        margin-top: 20px;
        padding: 15px;
    }
    
    .gallery-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .gallery-wrapper-integrated {
        height: 270px;
        /* Enhanced mobile gallery performance */
        -webkit-overflow-scrolling: touch;
    }
    
    .gallery-slider-integrated {
        /* Ultra-smooth mobile transitions */
        transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
        /* Hardware acceleration */
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
    }
    
    .gallery-slide {
        /* Smooth image rendering */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    .gallery-slide img {
        /* Optimized image rendering */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
    
    .gallery-dot {
        width: 8px;
        height: 8px;
        /* Smooth dot transitions */
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .gallery-controls {
        margin-top: 12px;
    }
}

@media (max-width: 360px) {
    .video-wrapper {
        padding-bottom: 56.25%; /* Keep 16:9 ratio */
        border-radius: 5px;
    }
    
    .video-play-button {
        width: 40px;
        height: 40px;
    }
    
    .play-icon {
        font-size: 14px;
    }
    
    .video-wrapper::before,
    .video-wrapper::after {
        width: 12px;
        height: 12px;
        border-width: 1px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .play-icon {
        font-size: 20px;
    }
    
    .video-info h4 {
        font-size: 14px;
    }
    
    .video-info p {
        font-size: 11px;
    }
    
    .gallery-wrapper-integrated {
        height: 240px;
    }
    
    .game-description-text {
        margin-top: 18px;
        padding: 0 12px;
    }
    
    .description-title {
        font-size: 13px;
        margin-bottom: 10px;
        letter-spacing: 0.2px;
    }
    
    .description-content {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .detailed-ratings {
        margin-top: 35px;
        padding: 0;
    }
    
    .comments-section {
        margin-top: 35px;
    }
    
    .comment-item {
        width: 250px;
        padding: 12px;
    }
    
    .comment-name {
        font-size: 13px;
    }
    
    .comment-text {
        font-size: 11px;
    }
    
    .comment-rating {
        font-size: 11px;
    }
    
    
    .ratings-container {
        gap: 12px;
    }
    
    .rating-circle {
        width: 60px;
        height: 60px;
    }
    
    .rating-number {
        font-size: 14px;
    }
    
    .rating-label {
        font-size: 8px;
    }
    
    .footer-section {
        margin-top: 20px;
        padding: 15px 0;
    }
    
    .footer-text p {
        font-size: 10px;
    }
    
    .footer-links {
        gap: 15px;
    }
    
    .footer-links span {
        font-size: 9px;
    }
}

/* AI Character Design Modal Styles */
.ai-design-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: stretch;
    justify-content: center;
    z-index: 10002;
    opacity: 1;
    transition: opacity 0.5s ease;
    overflow: hidden;
    direction: ltr; /* scrollbar side = right */
}

.ai-design-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.ai-design-content {
    background: linear-gradient(135deg, rgba(10, 10, 20, 0.95) 0%, rgba(20, 10, 25, 0.92) 100%);
    backdrop-filter: blur(40px) saturate(180%);
    border-radius: 0;
    padding: 12px 14px;
    max-width: var(--phone-width);
    width: 100%;
    height: 100%;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: none;
    border: none;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    direction: ltr; /* force scrollbar to the right */
}

.ai-design-content > * {
    direction: rtl;
}

.ai-design-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--pink-soft), transparent);
}

/* Header Section */
.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid rgba(255, 20, 147, 0.2);
}

.ai-logo {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: var(--fs-lg);
    font-weight: 800;
    background: linear-gradient(135deg, #ff1493, #ff69b4, #ff1493);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.hamburger-menu {
    font-size: var(--icon-md);
    color: #ffffff;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    min-width: var(--btn-min-width);
    min-height: var(--btn-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu:hover {
    background: rgba(255, 20, 147, 0.2);
    transform: scale(1.1);
}

/* Title Section */
.ai-title-section {
    text-align: center;
    margin-bottom: var(--space-md);
}

.ai-main-title {
    font-family: 'Outfit', sans-serif;
    font-size: var(--fs-lg);
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.highlight-text {
    background: linear-gradient(135deg, #ff1493, #ff69b4, #ff1493);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 20, 147, 0.6);
}

/* Progress Bar */
.progress-section {
    margin-bottom: var(--space-md);
}

.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0 var(--space-xl);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: calc(clamp(25px, 6vw, 32px) / 2);
    left: clamp(30px, 8vw, 40px);
    right: clamp(30px, 8vw, 40px);
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: clamp(25px, 6vw, 32px);
    height: clamp(25px, 6vw, 32px);
    border-radius: 50%;
    background: rgba(10, 10, 20, 0.95);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: var(--fs-xs);
    margin-bottom: var(--space-xs);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.step-label {
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: linear-gradient(135deg, var(--pink-soft), rgba(255, 105, 180, 0.6));
    border-color: var(--pink-soft);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
    transform: scale(1.1);
}

.progress-step.active .step-label {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.progress-step:hover .step-number {
    transform: scale(1.05);
    background: rgba(255, 20, 147, 0.3);
}

/* Gender Selection */
.gender-selection {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: var(--space-sm);
    flex-wrap: nowrap;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    overflow: hidden;
    border: none;
    background: transparent;
}

.gender-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--gap-xs);
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    flex: 1;
    min-height: clamp(40px, 10vw, 50px);
    position: relative;
    will-change: transform, background-color;
}

/* دکمه زن - کرو سمت چپ بالا */
.gender-option:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

/* دکمه ترنس - کرو سمت راست بالا */
.gender-option:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.gender-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 20, 147, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gender-option:hover::before {
    opacity: 0;
}

.gender-option.active {
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 2px solid var(--pink-soft);
}

.gender-option.active span {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.gender-icon {
    font-size: 1.35rem;
    line-height: 1;
    color: rgba(255, 182, 193, 0.95);
    filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.35));
    transition: all 0.25s ease;
    font-weight: 700;
}

.gender-option[data-gender="female"] .gender-icon {
    color: #ff69b4;
}

.gender-option[data-gender="male"] .gender-icon {
    color: #6ecbff;
}

.gender-option[data-gender="trans"] .gender-icon {
    color: #c084fc;
}

.gender-option:hover .gender-icon {
    transform: scale(1.12);
}

.gender-option.active .gender-icon {
    filter: drop-shadow(0 0 12px rgba(255, 20, 147, 0.65));
    transform: scale(1.08);
}

.gender-option span {
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-md);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Character Display */
.character-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-xs);
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.02);
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

    .character-column {
        display: flex;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        overflow: visible;
        min-width: 0;
        flex: 1;
    }

.character-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 0 0 var(--radius-lg);
    padding: var(--space-sm);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    will-change: transform, opacity;
}

/* کارت سمت راست (Anime) - راست کرو، چپ صاف */
.character-card[data-style="anime"] {
    border-radius: 0 0 var(--radius-lg) 0;
}

.character-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.1), rgba(255, 105, 180, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.character-card:hover {
    border-color: rgba(255, 20, 147, 0.3);
    transform: translateY(-1px) scale(1.02);
}

.character-card.active {
    border-color: var(--pink-soft);
    border-width: 1px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 40px rgba(255, 20, 147, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.character-card.active::before {
    opacity: 1;
}

.character-card:not(.active) {
    opacity: 0.3;
}

.character-image {
    position: relative;
    width: 100%;
    height: auto;
    /* Match page1 video size 560×704 */
    aspect-ratio: 35 / 44;
    border-radius: 0 0 0 0;
    overflow: hidden;
    margin-bottom: var(--space-xs);
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.character-image img,
.character-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 0 0 0 0;
    transition: all 0.3s ease;
    box-sizing: border-box;
    display: block;
}
    
/* Mobile specific fixes for character images */
@media (max-width: 768px) {
    .character-image img,
    .character-video {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        min-width: 0;
        max-width: 100%;
        display: block;
    }
}

/* تصویر کارت سمت راست (Anime) - راست کرو، چپ صاف */
.character-card[data-style="anime"] .character-image {
    border-radius: 0 0 0 0;
}

.character-card[data-style="anime"] .character-image img,
.character-card[data-style="anime"] .character-video {
    border-radius: 0 0 0 0;
}

.character-video {
    position: absolute;
    top: 0;
    left: 0;
    /* بهینه‌سازی برای لود سریع */
    image-rendering: optimizeSpeed;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: transform;
}

.character-card.active .character-image img,
.character-card.active .character-video {
    transform: scale(1);
}

.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ffffff;
}

.placeholder-icon {
    font-size: clamp(2.5rem, 8vw, 4rem);
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.placeholder-text {
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    text-align: center;
    opacity: 0.9;
}

.style-button {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0 0 0 var(--radius-md);
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-md);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    min-height: var(--btn-min-height);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
}

/* دکمه کارت سمت راست (Anime) - راست پایین کرو */
.character-card[data-style="anime"] .style-button {
    border-radius: 0 0 var(--radius-md) 0;
}

.style-button.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-bottom: 2px solid var(--pink-soft);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.style-button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

/* Action Buttons — always after step content in normal flow */
.action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--gap-sm);
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
    margin-top: 16px;
    margin-bottom: 8px;
    padding: 0;
    background: none;
}

.design-ai-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    font-family: 'Outfit', sans-serif;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    backdrop-filter: blur(20px);
    min-height: var(--btn-min-height);
    min-width: var(--btn-min-width);
}

.design-ai-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--pink-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 20, 147, 0.15);
}

.btn-icon {
    font-size: var(--icon-sm);
}

.next-button {
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.6), rgba(255, 105, 180, 0.6));
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-xl);
    font-family: 'Outfit', sans-serif;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 
        0 8px 32px rgba(255, 20, 147, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    min-height: var(--btn-min-height);
    min-width: var(--btn-min-width);
}

.next-button.install-mode {
    background: linear-gradient(135deg, #39ff8a 0%, #00e676 45%, #00c853 100%);
    color: #062816;
    letter-spacing: 2px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    box-shadow:
        0 0 18px rgba(57, 255, 138, 0.55),
        0 0 36px rgba(0, 230, 118, 0.35),
        0 8px 28px rgba(0, 200, 83, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    animation: installGlow 1.8s ease-in-out infinite;
}

.next-button.install-mode:hover {
    background: linear-gradient(135deg, #5cff9f 0%, #1af07f 45%, #00e676 100%);
    color: #042012;
    box-shadow:
        0 0 22px rgba(57, 255, 138, 0.75),
        0 0 48px rgba(0, 230, 118, 0.45),
        0 12px 36px rgba(0, 200, 83, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transform: translateY(-3px);
}

@keyframes installGlow {
    0%, 100% {
        box-shadow:
            0 0 16px rgba(57, 255, 138, 0.45),
            0 0 32px rgba(0, 230, 118, 0.28),
            0 8px 28px rgba(0, 200, 83, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.45);
    }
    50% {
        box-shadow:
            0 0 26px rgba(57, 255, 138, 0.8),
            0 0 52px rgba(0, 230, 118, 0.5),
            0 10px 32px rgba(0, 200, 83, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.55);
    }
}

.next-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.next-button:hover::before {
    left: 100%;
}

.next-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(255, 20, 147, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.7), rgba(255, 105, 180, 0.7));
}

.next-button:active {
    transform: translateY(-1px);
}

/* Tablet Responsive - Two columns with good spacing */
@media (min-width: 769px) and (max-width: 1024px) {
    .character-display {
        grid-template-columns: 1fr 1fr;
        gap: var(--gap-lg);
    }
}

/* Step Content Styles */
.step-content {
    width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.ai-header,
.ai-title-section,
.progress-section {
    flex: 0 0 auto;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: var(--fs-lg);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: var(--space-lg);
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.general-content,
.face-content,
.body-content,
.details-content,
.image-content {
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-lg);
}

.setting-item,
.feature-item,
.body-item,
.detail-item {
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.setting-item label,
.feature-item label,
.body-item label,
.detail-item label {
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--space-xs);
}

.setting-item input,
.setting-item select,
.feature-item input,
.body-item input,
.body-item select {
    padding: var(--space-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-sm);
    transition: all 0.3s ease;
}

.setting-item input:focus,
.setting-item select:focus,
.feature-item input:focus,
.body-item input:focus,
.body-item select:focus {
    outline: none;
    border-color: var(--pink-soft);
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.3);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.body-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.accessory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.accessory-option {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.accessory-option:hover {
    background: rgba(255, 20, 147, 0.2);
    border-color: var(--pink-soft);
    transform: scale(1.05);
}

.summary-intro {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-align: center;
}

.image-section .image-content {
    padding: 10px;
    margin-bottom: 0;
}

.selection-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
}

.summary-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 72px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-media--symbol {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.summary-video,
.summary-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.summary-fallback {
    display: flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.summary-symbol {
    font-size: 20px;
    line-height: 1;
    color: #ffffff;
}

.summary-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 0;
    width: 100%;
    text-align: center;
}

.summary-title {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.1;
}

.summary-value {
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}

.action-buttons:has(.next-button.install-mode) {
    justify-content: stretch;
}

.action-buttons:has(.next-button.install-mode) .next-button.install-mode {
    width: 100%;
    flex: 1;
}

.final-character-preview {
    display: flex;
    justify-content: center;
    margin-top: var(--space-lg);
}

.character-preview {
    width: 200px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder {
    text-align: center;
    color: #ffffff;
}

.preview-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.8;
}

.preview-text {
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-md);
    font-weight: 600;
    opacity: 0.9;
}

/* General Section Styles - Optimized & Cool */
.general-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    padding: 8px;
}

.ethnicity-section {
    margin-bottom: 4px;
}

/* Ethnicity Section */
.ethnicity-section,
.hair-section,
.body-custom-section {
    width: 100%;
    margin-bottom: var(--space-xl);
}

.step-content#step4 .body-custom-section {
    margin-bottom: 0;
}

.body-custom-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 6px 6px;
    box-sizing: border-box;
    margin-bottom: 0;
}

.body-option-block {
    width: 100%;
    margin-bottom: 0;
}

.body-option-block .hair-title {
    margin: 0 0 4px;
    font-size: 0.9rem;
    line-height: 1.1;
}

.body-option-block.hidden {
    display: none;
}

.progress-step.female-only.is-hidden {
    display: none;
}

.progress-bar {
    gap: 2px;
    padding: 0 clamp(4px, 2vw, 16px);
}

.progress-bar .step-label {
    font-size: clamp(0.55rem, 2.2vw, 0.75rem);
    white-space: nowrap;
}

/* Coverflow option carousel */
.option-carousel {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0 8px;
    user-select: none;
    touch-action: pan-y;
    direction: ltr;
    isolation: isolate;
    overflow: hidden;
}

.carousel-stage {
    position: relative;
    flex: 1;
    min-width: 0;
    height: clamp(280px, 58vw, 380px);
    min-height: clamp(280px, 58vw, 380px);
    perspective: 1100px;
    overflow: hidden;
    transform-style: preserve-3d;
}

.ethnicity-grid.carousel-track,
.hair-grid.carousel-track,
.body-option-block .hair-grid.carousel-track {
    display: block !important;
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    overflow: hidden;
    transform-style: preserve-3d;
}

.carousel-track > .ethnicity-card,
.carousel-track > .hair-card,
.carousel-track > .body-option-card {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    float: none !important;
    inset: auto;
    width: clamp(150px, 42vw, 210px) !important;
    height: auto !important;
    max-height: 92%;
    aspect-ratio: 3 / 4;
    min-height: 0 !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        filter 0.35s ease;
    will-change: transform, opacity;
    filter: none;
}

.carousel-track > .ethnicity-card {
    aspect-ratio: 2 / 3;
}

/* Kill grid/active/hover transforms that drop cards off-center */
.carousel-track > .ethnicity-card.active,
.carousel-track > .hair-card.active,
.carousel-track > .body-option-card.active,
.carousel-track > .ethnicity-card:hover,
.carousel-track > .hair-card:hover,
.carousel-track > .body-option-card:hover,
.carousel-track > .ethnicity-card.active:hover,
.carousel-track > .hair-card.active:hover,
.carousel-track > .body-option-card.active:hover {
    transform: translate(-50%, -50%) scale(0.4);
}

.carousel-track > .is-center,
.carousel-track > .is-center.active,
.carousel-track > .is-center:hover,
.carousel-track > .is-center.active:hover {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1;
    pointer-events: auto;
    z-index: 6;
    filter: none;
}

.carousel-track > .is-prev,
.carousel-track > .is-prev.active,
.carousel-track > .is-prev:hover {
    transform: translate(-112%, -50%) scale(0.72) rotateY(18deg) !important;
    opacity: 0.72;
    pointer-events: auto;
    z-index: 4;
    filter: brightness(0.85);
}

.carousel-track > .is-next,
.carousel-track > .is-next.active,
.carousel-track > .is-next:hover {
    transform: translate(12%, -50%) scale(0.72) rotateY(-18deg) !important;
    opacity: 0.72;
    pointer-events: auto;
    z-index: 4;
    filter: brightness(0.85);
}

.carousel-track > .is-far-prev,
.carousel-track > .is-far-prev:hover {
    transform: translate(-155%, -50%) scale(0.5) rotateY(26deg) !important;
    opacity: 0.25;
    pointer-events: none;
    z-index: 2;
    filter: brightness(0.7);
}

.carousel-track > .is-far-next,
.carousel-track > .is-far-next:hover {
    transform: translate(55%, -50%) scale(0.5) rotateY(-26deg) !important;
    opacity: 0.25;
    pointer-events: none;
    z-index: 2;
    filter: brightness(0.7);
}

.carousel-track > .is-center.ethnicity-card,
.carousel-track > .is-center.hair-card,
.carousel-track > .is-center.body-option-card {
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.45),
        0 0 28px rgba(255, 20, 147, 0.35);
}

.carousel-nav {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(10, 10, 20, 0.7);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    z-index: 8;
}

.carousel-nav:hover {
    background: rgba(255, 20, 147, 0.35);
    border-color: rgba(255, 20, 147, 0.7);
    transform: scale(1.06);
}

.carousel-nav:active {
    transform: scale(0.95);
}

.ethnicity-title,
.hair-title,
.age-title,
.skin-tone-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #ff1493 50%, #ffffff 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGradient 3s ease-in-out infinite;
}

@keyframes titleGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.ethnicity-grid,
.hair-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
    padding: 4px 2px;
}

.ethnicity-card,
.hair-card,
.body-option-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ethnicity-card {
    aspect-ratio: 2 / 3;
    border-width: 1.5px;
}

.ethnicity-card:not(.carousel-track > .ethnicity-card) {
    transform: none !important;
}

.ethnicity-card.active,
.hair-card.active,
.body-option-card.active {
    border-color: #ff1493;
    border-width: 2px;
    box-shadow: 
        0 0 18px rgba(255, 20, 147, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.15), rgba(255, 105, 180, 0.1));
}

.ethnicity-card.active:not(.carousel-track > .ethnicity-card) {
    transform: none !important;
    border-width: 2px;
}

.ethnicity-card::before,
.hair-card::before,
.body-option-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.1), rgba(255, 105, 180, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ethnicity-card:hover,
.hair-card:hover,
.body-option-card:hover {
    border-color: rgba(255, 20, 147, 0.5);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 20px rgba(255, 20, 147, 0.25),
        0 0 20px rgba(255, 20, 147, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
}

.ethnicity-card:hover:not(.carousel-track > .ethnicity-card) {
    transform: none;
}

.ethnicity-card:hover::before,
.hair-card:hover::before,
.body-option-card:hover::before {
    opacity: 1;
}

.ethnicity-card.active::before,
.hair-card.active::before,
.body-option-card.active::before {
    opacity: 1;
}

.ethnicity-card.premium,
.ethnicity-card.custom-card,
.hair-card.custom-card,
.body-option-card.custom-card {
    background: linear-gradient(135deg, rgba(140, 140, 145, 0.2), rgba(90, 90, 95, 0.12));
    border-color: rgba(160, 160, 165, 0.45);
}

.custom-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(100, 100, 105, 0.22);
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

.custom-card .ethnicity-label,
.custom-card .hair-label,
.custom-card .body-option-label,
.custom-card .ethnicity-checkmark,
.custom-card .hair-checkmark,
.custom-card .body-option-checkmark {
    z-index: 2;
}

.custom-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: var(--radius-sm);
    filter: grayscale(1) brightness(0.85) contrast(0.95);
}

.ethnicity-image .custom-card-image,
.hair-image .custom-card-image,
.body-option-image .custom-card-image {
    position: absolute;
    inset: 0;
}

.ethnicity-image,
.hair-image,
.body-option-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ethnicity-image img,
.ethnicity-image .ethnicity-video,
.hair-image .hair-video,
.body-option-image .body-option-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-sm);
    display: block;
}

.ethnicity-image .ethnicity-video,
.hair-image .hair-video,
.body-option-image .body-option-video {
    position: absolute;
    inset: 0;
}

.fallback-emoji {
    font-size: 32px;
    display: none;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.premium-icon {
    font-size: 22px;
    color: #ffffff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.ethnicity-label,
.hair-label,
.body-option-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
    padding: 10px 4px 4px;
    border-radius: 0;
    backdrop-filter: none;
    line-height: 1.1;
    z-index: 2;
}

.ethnicity-label {
    font-size: 0.58rem;
    padding: 12px 2px 3px;
}

.ethnicity-checkmark,
.hair-checkmark,
.body-option-checkmark {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #ffffff;
    font-weight: 900;
    opacity: 0;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(255, 20, 147, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 3;
}

.ethnicity-card.active .ethnicity-checkmark,
.hair-card.active .hair-checkmark,
.body-option-card.active .body-option-checkmark {
    opacity: 1;
    transform: scale(1.1);
}

/* Details advanced panels */
.details-select-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: var(--space-md);
    box-sizing: border-box;
}

.detail-panel {
    position: relative;
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        radial-gradient(circle at top right, rgba(255, 20, 147, 0.16), transparent 45%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.detail-panel.open {
    border-color: rgba(255, 20, 147, 0.55);
    box-shadow:
        0 12px 36px rgba(255, 20, 147, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.detail-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
}

.detail-panel-copy {
    flex: 1;
    min-width: 0;
}

.detail-panel-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.detail-panel-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 52%;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.detail-panel-toggle:hover,
.detail-panel.open .detail-panel-toggle {
    border-color: rgba(255, 20, 147, 0.7);
    background: rgba(255, 20, 147, 0.18);
}

.custom-select-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.custom-select-arrow {
    opacity: 0.75;
    transition: transform 0.25s ease;
}

.detail-panel.open .custom-select-arrow {
    transform: rotate(180deg);
}

.detail-panel-menu {
    display: none;
    padding: 0 8px 12px 10px;
    max-height: 360px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 20, 147, 0.55) rgba(255, 255, 255, 0.06);
}

.detail-panel-menu::-webkit-scrollbar {
    width: 4px;
}

.detail-panel-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    margin: 4px 0;
}

.detail-panel-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff69b4, #ff1493);
    border-radius: 999px;
    min-height: 28px;
}

.detail-panel-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff8cc8, #ff2e9f);
}

.detail-panel.open .detail-panel-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.detail-option-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    min-height: 0;
    height: auto;
    box-sizing: border-box;
    text-align: left;
}

.detail-option-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 20, 147, 0.55);
    background: rgba(255, 20, 147, 0.1);
    box-shadow: 0 6px 14px rgba(255, 20, 147, 0.18);
}

.detail-option-card.selected {
    border-color: #ff1493;
    background: rgba(255, 20, 147, 0.16);
    box-shadow: 0 0 0 1px rgba(255, 20, 147, 0.45), 0 6px 16px rgba(255, 20, 147, 0.22);
}

.detail-option-card > span:not(.option-check),
.detail-option-card .detail-option-name {
    padding: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-align: left;
    line-height: 1.2;
    flex: 1;
    min-width: 0;
}

.detail-option-card .detail-option-thumb {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
    min-height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 64px !important;
    align-self: center;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    display: block;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    padding: 0;
    line-height: 0;
}

.detail-option-card .detail-option-thumb img {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    border: 0;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

.detail-option-card .option-check {
    position: absolute;
    top: 6px;
    right: 6px;
    margin-left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 2;
}

.detail-option-card.img-missing .detail-option-thumb {
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.4), rgba(255, 255, 255, 0.08));
}

.detail-option-card.img-missing .detail-option-thumb img {
    display: none !important;
}

.detail-option-card.img-missing .detail-option-thumb::after {
    content: '◆';
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
}

.custom-select-thumb {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    box-sizing: border-box;
}

.detail-option-card.selected .option-check {
    display: flex;
}

.voice-panel .voice-widget-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 12px;
}

.voice-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 182, 193, 0.18);
    background:
        linear-gradient(160deg, rgba(255, 20, 147, 0.14), rgba(40, 12, 28, 0.55));
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.voice-card::before {
    content: '';
    position: absolute;
    inset: -50% auto auto -30%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 105, 180, 0.28), transparent 70%);
    pointer-events: none;
}

.voice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 105, 180, 0.55);
}

.voice-card.selected {
    border-color: rgba(255, 105, 180, 0.85);
    box-shadow: 0 0 18px rgba(255, 20, 147, 0.22);
}

.voice-card.playing {
    border-color: rgba(255, 140, 180, 0.95);
    box-shadow:
        0 0 22px rgba(255, 20, 147, 0.28),
        inset 0 0 18px rgba(255, 105, 180, 0.08);
}

.voice-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.voice-card-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
}

.voice-play-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #ff4da6, #ff1493);
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 20, 147, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.voice-play-btn:hover {
    transform: scale(1.06);
}

.voice-card.playing .voice-play-btn {
    background: linear-gradient(135deg, #ff9ec8, #ff4da6);
    color: #2a0418;
    box-shadow: 0 0 14px rgba(255, 140, 180, 0.45);
}

.voice-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5px;
    height: 16px;
    padding: 0 2px;
    position: relative;
    z-index: 1;
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.voice-wave span {
    width: 2px;
    flex: 0 0 2px;
    border-radius: 999px;
    background: linear-gradient(
        180deg,
        rgba(255, 220, 235, 0.95) 0%,
        rgba(255, 105, 180, 0.85) 45%,
        rgba(255, 20, 147, 0.55) 100%
    );
    box-shadow: 0 0 4px rgba(255, 105, 180, 0.25);
    height: 28%;
    transform-origin: center;
    animation: voiceIdle 1.8s ease-in-out infinite;
}

.voice-wave span:nth-child(1)  { animation-delay: 0.00s; height: 22%; }
.voice-wave span:nth-child(2)  { animation-delay: 0.08s; height: 34%; }
.voice-wave span:nth-child(3)  { animation-delay: 0.16s; height: 48%; }
.voice-wave span:nth-child(4)  { animation-delay: 0.04s; height: 62%; }
.voice-wave span:nth-child(5)  { animation-delay: 0.20s; height: 40%; }
.voice-wave span:nth-child(6)  { animation-delay: 0.12s; height: 72%; }
.voice-wave span:nth-child(7)  { animation-delay: 0.28s; height: 54%; }
.voice-wave span:nth-child(8)  { animation-delay: 0.06s; height: 68%; }
.voice-wave span:nth-child(9)  { animation-delay: 0.18s; height: 44%; }
.voice-wave span:nth-child(10) { animation-delay: 0.24s; height: 58%; }
.voice-wave span:nth-child(11) { animation-delay: 0.10s; height: 36%; }
.voice-wave span:nth-child(12) { animation-delay: 0.22s; height: 50%; }
.voice-wave span:nth-child(13) { animation-delay: 0.14s; height: 30%; }
.voice-wave span:nth-child(14) { animation-delay: 0.26s; height: 42%; }
.voice-wave span:nth-child(15) { animation-delay: 0.02s; height: 26%; }
.voice-wave span:nth-child(16) { animation-delay: 0.30s; height: 32%; }

.voice-card.playing .voice-wave span {
    animation-name: voicePulse;
    animation-duration: 0.7s;
    box-shadow: 0 0 6px rgba(255, 140, 180, 0.55);
}

@keyframes voiceIdle {
    0%, 100% { transform: scaleY(0.7); opacity: 0.45; }
    50% { transform: scaleY(1); opacity: 0.8; }
}

@keyframes voicePulse {
    0%, 100% { transform: scaleY(0.35); opacity: 0.55; }
    35% { transform: scaleY(1.15); opacity: 1; }
    70% { transform: scaleY(0.65); opacity: 0.75; }
}

@media (max-width: 480px) {
    .detail-panel.open .detail-panel-menu {
        max-height: 340px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .detail-option-card {
        padding: 6px;
        gap: 8px;
        min-height: 0;
    }

    .detail-option-card .detail-option-thumb {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        max-width: 60px !important;
        max-height: 60px !important;
        flex-basis: 60px !important;
        border-radius: 10px;
        background: #000;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .detail-option-card .detail-option-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .detail-option-card .detail-option-name {
        font-size: 0.72rem;
    }

    .detail-option-card > span:not(.option-check) {
        font-size: 0.72rem;
    }

    .voice-panel .voice-widget-grid {
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }

    .detail-panel-toggle {
        max-width: 48%;
        padding: 7px 8px;
        font-size: 0.75rem;
    }
}

/* Age Section — Circular Dial */
.age-section {
    width: 100%;
    margin-bottom: 8px;
}

.age-dial-wrapper {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.age-dial-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 10px;
    touch-action: none;
    user-select: none;
}

.age-glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 184px;
    height: 184px;
    border-radius: 50%;
    border: 1px solid rgba(255, 20, 147, 0.18);
    transform: translate(-50%, -50%);
    animation: ageRingPulse 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ageRingPulse {
    0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.03); }
}

.age-dial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 14px rgba(255, 20, 147, 0.2));
}

.age-dial-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 9;
    stroke-linecap: round;
}

.age-dial-progress {
    fill: none;
    stroke: url(#ageDialGradient);
    stroke-width: 9;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.08s ease-out;
    filter: drop-shadow(0 0 8px rgba(255, 20, 147, 0.45));
}

.age-tick-marks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.age-tick-mark {
    position: absolute;
    width: 2px;
    height: 7px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 1px;
    top: 4px;
    left: 50%;
    margin-left: -1px;
    transform-origin: 50% 96px;
    transition: background 0.25s, height 0.25s;
}

.age-tick-mark.active {
    background: #ff1493;
    height: 11px;
    box-shadow: 0 0 6px rgba(255, 20, 147, 0.55);
}

.age-tick-mark.near {
    background: rgba(255, 105, 180, 0.75);
    height: 9px;
}

.age-dial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.age-dial-value {
    font-family: 'Outfit', sans-serif;
    font-size: 46px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(180deg, #ffffff 0%, #ff69b4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.age-dial-value.bumped {
    transform: scale(1.08);
}

.age-dial-unit {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.age-dial-handle {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #ffd0e8, #ff1493);
    box-shadow:
        0 0 14px rgba(255, 20, 147, 0.7),
        0 0 28px rgba(255, 20, 147, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.35);
    cursor: grab;
    transform: translate(-50%, -50%);
    transition: box-shadow 0.2s, width 0.15s, height 0.15s;
    z-index: 10;
    touch-action: none;
}

.age-dial-handle:hover,
.age-dial-handle.active {
    width: 26px;
    height: 26px;
    box-shadow:
        0 0 22px rgba(255, 20, 147, 0.9),
        0 0 40px rgba(255, 20, 147, 0.4),
        inset 0 1px 3px rgba(255, 255, 255, 0.45);
}

.age-dial-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    opacity: 0.9;
}

.age-range-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 18px;
    margin-bottom: 10px;
}

.age-range-label {
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.age-range-label span:first-child {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
}

.age-quick-ages {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.age-quick-btn {
    width: 38px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.age-quick-btn:hover {
    border-color: rgba(255, 20, 147, 0.45);
    color: #ff69b4;
    background: rgba(255, 20, 147, 0.1);
}

.age-quick-btn.active {
    border-color: #ff1493;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.35), rgba(255, 105, 180, 0.18));
    box-shadow: 0 0 12px rgba(255, 20, 147, 0.3);
}

/* Skin Tone Section - Optimized */
.skin-tone-section {
    width: 100%;
    margin-bottom: var(--space-xl);
}

.skin-tone-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    overflow-x: auto;
}

.skin-tone-option {
    width: 85px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 3px solid transparent;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    will-change: transform, opacity;
    flex: 0 0 auto;
    overflow: hidden;
}

/* Adjacent siblings scale down */
.skin-tone-option.adjacent-left,
.skin-tone-option.adjacent-right {
    transform: scale(0.85);
}

/* Glassmorphism effect - جلای شیشه‌ای */
.skin-tone-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

/* Glowing border effect */
.skin-tone-option::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    background: linear-gradient(45deg, 
        rgba(255, 20, 147, 0.4), 
        rgba(255, 105, 180, 0.6),
        rgba(255, 20, 147, 0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    background-size: 200% 200%;
    animation: gradientShiftBorder 3s ease infinite;
}

@keyframes gradientShiftBorder {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.skin-tone-option:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.skin-tone-option:hover::before {
    opacity: 1;
}

.skin-tone-option:hover::after {
    opacity: 0.3;
}

.skin-tone-option.active {
    transform: scale(1.25) translateY(-3px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 0 35px rgba(255, 20, 147, 0.6),
        0 10px 30px rgba(255, 20, 147, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3);
    z-index: 10;
    backdrop-filter: blur(25px);
}

.skin-tone-option.active::before {
    opacity: 1;
}

.skin-tone-option.active::after {
    opacity: 0.8;
    animation: activeGlow 2s ease infinite;
}

@keyframes activeGlow {
    0%, 100% { 
        opacity: 0.8;
        filter: brightness(1);
    }
    50% { 
        opacity: 1;
        filter: brightness(1.2);
    }
}

.skin-tone-option span {
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: transparent;
    text-shadow: none;
    text-align: center;
    z-index: 2;
    transition: all 0.3s ease;
    position: relative;
}

/* Letter shine effect on hover */
.skin-tone-option span::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skin-tone-option:hover span::before {
    opacity: 1;
}

.skin-tone-option.active span {
    transform: scale(1.15);
    color: #ffffff;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(255, 255, 255, 0.4);
    font-weight: 900;
}

.skin-tone-option.active span::before {
    opacity: 1;
    text-shadow: 
        0 2px 15px rgba(255, 255, 255, 0.6),
        0 0 25px rgba(255, 255, 255, 0.5);
}

/* Mobile Responsive - Full Height */
@media (max-width: 768px) {
    .ai-design-modal {
        padding: 0;
        align-items: stretch;
    }
    
    /* Ensure proper grid layout on mobile */
    .character-display {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: clamp(4px, 1vw, 8px);
        width: 100%;
        min-width: 0;
        overflow: visible;
    }
    
    /* Full height modal for mobile */
    .ai-design-content {
        padding: clamp(8px, 2vw, 12px);
        width: 100%;
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: none;
        border-radius: clamp(8px, 2vw, 12px);
        overflow: visible;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        box-sizing: border-box;
    }
    
    /* Make sections flex to fill space */
    .character-display {
        flex: 0 0 auto;
        display: grid;
        align-content: flex-start;
    }
    
    /* Smaller header */
    .ai-header {
        margin-bottom: clamp(6px, 1.5vw, 10px);
        padding-bottom: clamp(4px, 1vw, 6px);
    }
    
    .logo-text {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }
    
    /* Compact title */
    .ai-title-section {
        margin-bottom: clamp(10px, 2.5vw, 16px);
    }
    
    .ai-main-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
        font-weight: 800;
        text-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
    }
    
    /* Smaller progress bar */
    .progress-section {
        margin-bottom: clamp(12px, 3vw, 18px);
    }
    
    .progress-bar {
        padding: 0 clamp(5px, 2vw, 10px);
        gap: clamp(12px, 3vw, 20px);
    }
    
    .progress-bar::before {
        top: calc(clamp(36px, 8vw, 48px) / 2);
        left: clamp(15px, 4vw, 25px);
        right: clamp(15px, 4vw, 25px);
    }
    
    .step-number {
        width: clamp(36px, 8vw, 48px);
        height: clamp(36px, 8vw, 48px);
        font-size: clamp(0.9rem, 2.8vw, 1.1rem);
        margin-bottom: clamp(4px, 1vw, 6px);
    }
    
    .step-label {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        font-weight: 700;
    }
    
    /* Compact gender selection */
    .gender-selection {
        margin-bottom: clamp(4px, 1vw, 6px);
        padding: clamp(4px, 1vw, 6px) clamp(1px, 0.3vw, 2px);
        box-sizing: border-box;
    }
    
    .gender-option {
        padding: clamp(6px, 1.5vw, 8px) clamp(8px, 2vw, 14px);
        min-height: clamp(42px, 9vw, 52px);
        gap: clamp(3px, 1vw, 5px);
        flex: 1;
    }
    
    .gender-icon {
        font-size: 1.25rem;
    }
    
    .gender-option span {
        font-size: clamp(0.85rem, 2.5vw, 1rem);
        font-weight: 700;
    }
    
    /* Two columns on mobile with smaller cards */
    .character-display {
        grid-template-columns: 1fr 1fr;
        gap: clamp(4px, 1vw, 8px);
        margin-bottom: 0;
        padding: clamp(8px, 2vw, 12px);
        box-sizing: border-box;
        border-bottom: 1px solid rgba(255, 20, 147, 0.3);
        width: 100%;
        overflow: visible;
        min-width: 0;
    }
    
    .character-column {
        display: flex;
        justify-content: center;
        width: 100%;
        min-width: 0;
        flex: 1;
        box-sizing: border-box;
        overflow: visible;
    }
    
    .character-card {
        padding: clamp(4px, 1vw, 6px);
        max-width: 100%;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        flex-shrink: 1;
        flex-grow: 1;
        align-self: stretch;
    }
    
    /* Auto height images on mobile — keep video aspect 560×704 */
    .character-image {
        height: auto;
        aspect-ratio: 35 / 44;
        min-height: 0;
        max-height: none;
        margin-bottom: clamp(2px, 0.5vw, 4px);
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
        box-sizing: border-box;
        align-self: stretch;
    }
    
    .placeholder-icon {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        margin-bottom: clamp(2px, 0.5vw, 4px);
    }
    
    .placeholder-text {
        font-size: clamp(0.6rem, 1.5vw, 0.8rem);
    }
    
    .style-button {
        padding: clamp(3px, 0.8vw, 5px) clamp(4px, 1vw, 8px);
        font-size: clamp(0.8rem, 2.2vw, 1rem);
        min-height: clamp(28px, 5vw, 36px);
        font-weight: 700;
        margin-top: auto;
    }
    
    /* Compact action buttons — sit under content, not screen-fixed */
    .action-buttons {
        gap: clamp(4px, 1vw, 8px);
        margin-top: clamp(14px, 3vw, 22px);
        margin-bottom: clamp(10px, 3vw, 18px);
        flex: 0 0 auto;
        padding: 0;
        background: none;
    }
    
    .design-ai-button,
    .next-button {
        padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 18px);
        font-size: clamp(0.75rem, 2.2vw, 0.9rem);
        min-height: clamp(40px, 9vw, 50px);
        gap: clamp(3px, 1vw, 5px);
        font-weight: 700;
        transform: none;
    }
    
    .next-button {
        background: linear-gradient(135deg, rgba(255, 20, 147, 0.8), rgba(255, 105, 180, 0.8));
        box-shadow: 0 8px 32px rgba(255, 20, 147, 0.4);
        transform: none;
    }

    .next-button:hover,
    .design-ai-button:hover {
        transform: translateY(-1px);
    }
    
    .btn-icon {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }
    
    /* Mobile responsive for General section */
    .general-section {
        display: flex;
        flex-direction: column;
        gap: var(--space-xl);
        width: 100%;
        min-width: 0;
        overflow: visible;
        padding: var(--space-sm);
    }
    
    .ethnicity-section,
    .hair-section,
    .age-section,
    .skin-tone-section {
        margin-bottom: var(--space-lg);
    }
    
    .ethnicity-title,
    .hair-title,
    .age-title,
    .skin-tone-title {
        font-size: var(--fs-md);
        margin-bottom: var(--space-md);
    }
    
    .ethnicity-grid:not(.carousel-track),
    .hair-grid:not(.carousel-track) {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: clamp(4px, 1vw, 10px);
        padding: var(--space-xs);
    }

    .carousel-stage {
        height: clamp(260px, 62vw, 360px);
        min-height: clamp(260px, 62vw, 360px);
    }

    .carousel-track > .ethnicity-card,
    .carousel-track > .hair-card,
    .carousel-track > .body-option-card {
        width: clamp(130px, 40vw, 180px) !important;
    }

    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }
    
    .ethnicity-image,
    .hair-image,
    .body-option-image {
        font-size: 16px;
    }
    
    .ethnicity-label {
        font-size: 0.55rem;
        padding: 10px 2px 3px;
        bottom: 0;
        left: 0;
        right: 0;
    }
    
    .ethnicity-checkmark {
        width: 15px;
        height: 15px;
        font-size: 8px;
        top: 3px;
        right: 3px;
    }
    
    .age-display {
        max-width: 170px;
        padding: 6px 12px;
    }
    
    .age-number {
        font-size: 1.65rem;
    }
    
    .age-dial-wrapper {
        max-width: 240px;
    }
    
    .skin-tone-container {
        gap: clamp(6px, 1.5vw, 12px);
        padding: var(--space-sm);
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .skin-tone-option {
        width: 60px;
        height: 45px;
        flex-shrink: 0;
        border-radius: 10px;
    }
    
    .skin-tone-option:hover {
        transform: scale(1.05) translateY(-2px);
    }
    
    .skin-tone-option.active {
        transform: scale(1.25) translateY(-3px);
    }
    
    .skin-tone-option span {
        font-size: clamp(0.65rem, 1.8vw, 0.75rem);
    }
}

/* Age Animation Keyframes */
@keyframes agePulse {
    0% {
        transform: scale(1) rotate(0deg);
        color: #ffffff;
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    }
    50% {
        transform: scale(1.2) rotate(5deg);
        color: #ff1493;
        text-shadow: 0 0 40px rgba(255, 20, 147, 0.8), 0 0 80px rgba(255, 20, 147, 0.4);
    }
    100% {
        transform: scale(1) rotate(0deg);
        color: #ffffff;
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
    }
}

@keyframes ageBounce {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1) rotate(-2deg);
    }
    75% {
        transform: scale(1.1) rotate(2deg);
    }
}

@keyframes ageGlow {
    0% {
        filter: drop-shadow(0 0 20px rgba(255, 20, 147, 0.6));
    }
    100% {
        filter: drop-shadow(0 0 40px rgba(255, 20, 147, 0.9));
    }
}

@keyframes ageGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes ageSlideLeft {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(255, 20, 147, 0.6));
    }
    50% {
        transform: scale(1.3);
        filter: drop-shadow(0 0 50px rgba(255, 20, 147, 1));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(255, 20, 147, 0.6));
    }
}

/* ========================================
   GLOBAL PHONE FRAME LOCK
   Desktop/PC always mirrors mobile layout
   ======================================== */
html {
    background: #050505;
}

body {
    padding: 0 !important;
}

.container,
.app-card,
.ai-design-content,
.age-modal-content,
.loading-stage {
    max-width: var(--phone-width) !important;
    width: 100% !important;
}

.container,
.app-card,
.ai-design-content {
    margin-left: auto !important;
    margin-right: auto !important;
}

.ai-design-modal,
.age-modal {
    justify-content: center !important;
}

.ai-design-content {
    height: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
}

/* Keep character cards in 2-col phone layout at all widths */
.character-display {
    grid-template-columns: 1fr 1fr !important;
}

@media (min-width: 769px) {
    body {
        background:
            radial-gradient(circle at top, rgba(255, 20, 147, 0.08), transparent 40%),
            #050505 !important;
    }

    .container,
    .app-card {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 20px 60px rgba(0, 0, 0, 0.55);
    }

    .ai-design-modal {
        background: rgba(0, 0, 0, 0.92) !important;
    }

    .ai-design-content {
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 24px 80px rgba(0, 0, 0, 0.65);
    }
}




/* ===== Persian / RTL defaults ===== */
html[dir="rtl"] body,
html[lang="fa"] body {
    font-family: 'Vazirmatn', 'Poppins', 'Outfit', sans-serif;
}

html[dir="rtl"] .simple-title,
html[dir="rtl"] .app-copyright,
html[dir="rtl"] .app-purchases {
    text-align: right;
}

html[dir="rtl"] .app-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .loading-content {
    text-align: right;
}

html[dir="rtl"] .loading-copy {
    text-align: right;
}

html[dir="rtl"] .age-dial-container,
html[dir="rtl"] .age-dial-wrapper {
    direction: ltr;
}

html[dir="rtl"] .progress-bar {
    direction: ltr;
}

html[dir="rtl"] .stats-grid,
html[dir="rtl"] .ratings-container {
    direction: ltr;
}

html[dir="rtl"] .description-title,
html[dir="rtl"] .description-content,
html[dir="rtl"] .game-description-text {
    text-align: center;
}

html[dir="rtl"] .comment-content {
    text-align: right;
}

html[dir="rtl"] .footer-links {
    flex-wrap: wrap;
    justify-content: center;
}

/* ========== Account login overlay (ساخت اکانت) ========== */
/* قفل دانلود/درگ مدیا */
img, video, canvas {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}
video::-webkit-media-controls-download-button {
    display: none !important;
}
video::-internal-media-controls-download-button {
    display: none !important;
}
a[download],
a[href$=".apk"],
a[href*="downloads/"] {
    pointer-events: none !important;
    display: none !important;
}

.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 22px;
    background: rgba(8, 8, 22, 0.42);
    backdrop-filter: blur(10px) saturate(1.15);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.login-modal {
    position: relative;
    width: 100%;
    max-width: min(300px, 78vw);
    background: linear-gradient(145deg, rgba(22, 22, 45, 0.55), rgba(15, 15, 35, 0.48));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 28px 18px 22px;
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 0 80px rgba(255, 20, 147, 0.06);
    transform: scale(0.92) translateY(24px);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    font-family: 'Vazirmatn', 'Poppins', sans-serif;
}

.login-overlay.active .login-modal {
    transform: scale(1) translateY(0);
}

.login-modal::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -40%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 20, 147, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.login-modal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #dc143c, #ff1493, #9400d3, #ff69b4, #dc143c);
    background-size: 300% 100%;
    animation: gradientShift 3s ease-in-out infinite;
    z-index: 2;
}

.login-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 3;
}

.login-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    transform: rotate(90deg);
}

.login-header {
    text-align: center;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.login-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 22px rgba(255, 20, 147, 0.28);
}

.login-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.login-subtitle {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.42);
    line-height: 1.55;
}

.login-modal .input-group {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.login-modal .input-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 7px;
    text-align: right;
}

.username-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 3px 10px 3px 3px;
    transition: all 0.3s ease;
}

.username-input-wrap:focus-within {
    border-color: rgba(255, 20, 147, 0.45);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.1);
}

.username-input-wrap.is-ok {
    border-color: rgba(0, 230, 118, 0.55);
}

.username-input-wrap.is-bad {
    border-color: rgba(255, 80, 100, 0.5);
}

.username-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 8px 8px;
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    direction: ltr;
    text-align: left;
    min-width: 0;
}

.username-input::placeholder {
    color: rgba(255, 255, 255, 0.18);
    font-weight: 400;
}

.username-status {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 800;
}

.username-status.is-ok {
    color: #00e676;
    text-shadow: 0 0 10px rgba(0, 230, 118, 0.55);
}

.username-status.is-bad {
    color: #ff6b6b;
}

.username-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff69b4;
    animation: usernameSpin 0.7s linear infinite;
}

@keyframes usernameSpin {
    to { transform: rotate(360deg); }
}

.phone-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 3px;
    transition: all 0.3s ease;
}

.phone-input-wrap:focus-within {
    border-color: rgba(255, 20, 147, 0.45);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.1);
}

.login-modal .phone-prefix {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 11px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    min-width: 0;
    border: none;
}

.login-modal .phone-prefix .flag {
    font-size: 15px;
    line-height: 1;
}

.login-modal .phone-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 8px 6px;
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    direction: ltr;
    text-align: left;
    letter-spacing: 0.4px;
    min-width: 0;
}

.login-modal .phone-input::placeholder {
    color: rgba(255, 255, 255, 0.18);
    font-weight: 400;
}

.login-error {
    display: none;
    background: rgba(255, 50, 50, 0.08);
    border: 1px solid rgba(255, 50, 50, 0.15);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #ff6b6b;
    margin-bottom: 12px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-error.show {
    display: block;
    animation: loginShake 0.4s ease;
}

@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.login-btn {
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 14px;
    font-family: 'Vazirmatn', 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #ff1493, #ff69b4);
    cursor: pointer;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.28);
    margin-top: 4px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 20, 147, 0.38);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.login-btn-ghost {
    margin-top: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 18px;
}

.login-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    box-shadow: none;
    transform: none;
}

.login-info {
    display: none;
    background: rgba(43, 125, 233, 0.1);
    border: 1px solid rgba(43, 125, 233, 0.22);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #8ec5ff;
    margin-bottom: 12px;
    text-align: center;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

.login-info.show {
    display: block;
}

.login-info.is-ok {
    background: rgba(0, 230, 118, 0.08);
    border-color: rgba(0, 230, 118, 0.22);
    color: #69f0ae;
}

.login-step {
    display: none;
    position: relative;
    z-index: 1;
}

.login-step.on {
    display: block;
}

.login-hint {
    margin: 8px 2px 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.6;
    text-align: right;
}

.login-success {
    display: none;
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 8px 0 4px;
}

.login-success.on {
    display: block;
}

.login-tick {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(0, 230, 118, 0.12);
    color: #00e676;
    font-size: 26px;
    line-height: 52px;
    box-shadow: 0 0 24px rgba(0, 230, 118, 0.18);
}

.login-ok-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.login-ok-msg,
.login-ok-who {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.8;
}
