:root {
    --deep-black: #0a0a0a;
    --card-black: #141414;
    --accent-red: #e50914;
    --neon-red: #ff0033;
    --text-gray: #b3b3b3;
    --accent-yellow: #ffd700;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--deep-black);
    color: white;
    font-family: 'Crimson Pro', serif;
    overflow-x: hidden;
}

/* ================================================
   STAGE 1 & 4: CINEMATIC INTRO (FIXED FOR MOBILE)
   ================================================ */
#initialIntro, #personalIntro {
    position: fixed;
    inset: 0;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem; /* Added padding for mobile */
}

#initialIntro {
    animation: fadeOutScreen 0.6s ease-out 1.9s forwards;
}

#personalIntro {
    display: none;
    z-index: 10002;
}

#personalIntro.active {
    display: flex;
    animation: fadeInScreen 0.5s ease-out;
}

#personalIntro.fadeout {
    animation: fadeOutScreen 0.6s ease-out forwards;
}

.intro-content {
    text-align: center;
    animation: zoomInContent 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    width: 100%;
    max-width: 1200px;
}

.intro-title {
    font-family: 'Oswald', sans-serif;
    /* FIXED: More responsive font size for mobile */
    font-size: clamp(2rem, 10vw, 9rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.intro-glow {
    background: linear-gradient(45deg, #ff0000, #ffd700, #ff0000, #ffd700);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: 
        glowPulse 0.8s ease-in-out infinite,
        gradientShift 2s ease infinite,
        flicker 0.15s 0.3s 3;
    filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.8))
            drop-shadow(0 0 60px rgba(255, 215, 0, 0.6))
            drop-shadow(0 0 90px rgba(255, 0, 0, 0.4));
}

.intro-subtitle {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(0.7rem, 2.5vw, 1.5rem);
    letter-spacing: 0.3em;
    color: #ffd700;
    margin-top: 1rem;
    opacity: 0;
    animation: fadeInSubtitle 0.6s ease-out 0.5s forwards;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    word-wrap: break-word;
}

/* ================================================
   STAGE 2: ROLE SELECTION (OPTIMIZED FOR MOBILE)
   ================================================ */
#roleSelection {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
    background: radial-gradient(ellipse at center, rgba(20, 20, 20, 0.5) 0%, var(--deep-black) 70%);
    overflow-y: auto;
    /* FIXED: Added padding for mobile */
    padding: 1.5rem;
}

#roleSelection.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInScreen 0.8s ease-out forwards;
}

#roleSelection::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
}

.role-container {
    width: 100%;
    max-width: 1400px;
    position: relative;
    z-index: 1;
}

.role-header {
    text-align: center;
    margin-bottom: 2rem;
}

.role-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #cccccc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.role-subtitle {
    font-size: clamp(0.85rem, 2vw, 1.2rem);
    color: var(--text-gray);
    font-weight: 300;
    letter-spacing: 0.05em;
}

.role-grid {
    display: grid;
    gap: 1.25rem;
    width: 100%;
}

/* Mobile: Stack vertically */
@media (max-width: 767px) {
    .role-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }

    .role-header {
        margin-bottom: 1.5rem;
    }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .role-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 700px;
        margin: 0 auto;
    }

    .role-header {
        margin-bottom: 2.5rem;
    }
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
    .role-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }

    .role-header {
        margin-bottom: 3rem;
    }
}

.role-card {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.9), rgba(20, 20, 20, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    /* FIXED: Responsive padding */
    padding: 2rem 1.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-align: center;
    /* FIXED: Reduced min-height for mobile */
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.role-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.role-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--neon-red);
    box-shadow: 
        0 0 30px rgba(255, 0, 51, 0.4),
        0 0 60px rgba(255, 0, 51, 0.2),
        0 20px 50px rgba(0, 0, 0, 0.5);
}

.role-card:hover::before {
    background: linear-gradient(45deg, var(--neon-red), #ff3366, var(--neon-red), #ff6699);
    background-size: 300% 300%;
    animation: neonGlow 2s ease infinite;
    opacity: 1;
}

.role-icon {
    /* FIXED: Responsive icon size */
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    margin-bottom: 1rem;
    display: block;
    transition: transform 0.4s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.role-card:hover .role-icon {
    transform: scale(1.2) rotateZ(5deg);
}

.role-name {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.role-card:hover .role-name {
    color: var(--neon-red);
    text-shadow: 0 0 20px rgba(255, 0, 51, 0.5);
}

.role-description {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: var(--text-gray);
    line-height: 1.5;
}

/* ================================================
   STAGE 3: AUTHENTICATION MODAL
   ================================================ */
#authModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 1rem;
    overflow-y: auto;
}

#authModal.active {
    display: flex;
    animation: fadeInScreen 0.3s ease-out;
}

.auth-content {
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 1));
    border: 2px solid rgba(229, 9, 20, 0.3);
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: scaleIn 0.3s ease-out forwards;
}

.auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-close:hover {
    background: var(--accent-red);
    transform: rotate(90deg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--accent-red);
}

.auth-subtitle {
    color: var(--text-gray);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 10px;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    color: white;
}

.auth-tab:hover {
    background: rgba(255, 255, 255, 0.1);
}

.auth-tab.active {
    background: rgba(229, 9, 20, 0.2);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: formSlideIn 0.3s ease;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    color: var(--text-gray);
}

.form-input {
    width: 100%;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-red);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.2);
}

.form-input::placeholder {
    color: rgba(179, 179, 179, 0.5);
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    background: var(--accent-red);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.btn-auth:hover {
    background: #c00813;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.5);
}

/* ================================================
   STAGE 5: MAIN WEBSITE (YOUR ORIGINAL DESIGN)
   ================================================ */
#mainSite {
    display: none;
}

#mainSite.active {
    display: block;
    animation: fadeInScreen 0.8s ease-out;
}

/* YOUR ORIGINAL STYLES */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--deep-black);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

.book-card {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
}

.book-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(229, 9, 20, 0.3);
    z-index: 10;
}

.book-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-black);
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-red);
}

.video-placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.play-icon {
    width: 80px;
    height: 80px;
    background: rgba(229, 9, 20, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.play-icon:hover {
    transform: scale(1.1);
    background: var(--accent-red);
}

.play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

.writers-studio {
    background: linear-gradient(135deg, #1a0000 0%, #0a0a0a 50%, #001a1a 100%);
    position: relative;
    overflow: hidden;
}

.writers-studio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0 300 Q 300 200 600 300 T 1200 300 L 1200 600 L 0 600 Z" fill="rgba(229,9,20,0.03)"/></svg>');
    opacity: 0.5;
}

.studio-card {
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 9, 20, 0.2);
    transition: all 0.3s ease;
}

.studio-card:hover {
    border-color: var(--accent-red);
    box-shadow: 0 10px 40px rgba(229, 9, 20, 0.2);
}

.btn-primary {
    background: var(--accent-red);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    border: none;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-primary:hover {
    background: #c00813;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    border: 2px solid white;
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-secondary:hover {
    background: white;
    color: var(--deep-black);
    transform: translateY(-2px);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeInScreen {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOutScreen {
    to { opacity: 0; visibility: hidden; }
}

@keyframes zoomInContent {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes glowPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 30px rgba(255, 0, 0, 0.8))
                drop-shadow(0 0 60px rgba(255, 215, 0, 0.6)); 
    }
    50% { 
        filter: drop-shadow(0 0 50px rgba(255, 0, 0, 1))
                drop-shadow(0 0 100px rgba(255, 215, 0, 0.9)); 
    }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes fadeInSubtitle {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes particleFloat {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

@keyframes neonGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes formSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ================================================
   MOBILE SPECIFIC OPTIMIZATIONS
   ================================================ */
@media (max-width: 767px) {
    /* Intro screens padding */
    #initialIntro, #personalIntro {
        padding: 1.5rem;
    }

    .intro-title {
        letter-spacing: 0.05em;
    }

    .intro-subtitle {
        letter-spacing: 0.2em;
    }

    /* Role selection padding */
    #roleSelection {
        padding: 1.5rem 1rem;
    }

    /* Auth modal adjustments */
    .auth-content {
        padding: 2rem 1.25rem;
    }

    .auth-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }

    /* Play icon size */
    .play-icon {
        width: 60px;
        height: 60px;
    }
    
    .play-icon::after {
        border-left-width: 15px;
        border-top-width: 9px;
        border-bottom-width: 9px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .role-card {
        min-height: 200px;
        padding: 1.75rem 1rem;
    }

    .role-icon {
        font-size: 2.5rem;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1023px) {
    .auth-content {
        padding: 3rem 2rem;
    }
}

/* Desktop - restore original spacing */
@media (min-width: 1024px) {
    .role-card {
        padding: 2.5rem 1.5rem;
        min-height: 280px;
    }

    .role-icon {
        font-size: 3.5rem;
    }
}
/* Free Sample Button - Matches Premium Theme */
.btn-sample{
    width: 100%;
    padding: 1rem;
    background: var(--accent-yellow);
    border: none;
    border-radius: 10px;
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}


.btn-sample:hover {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #000;
    border-color: #ffed4e;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 215, 0, 0.3);
}

.btn-sample:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.2);
}

.btn-sample i {
    font-size: 18px;
}
/* Golden Ticket Animations */
@keyframes ticketEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-fade-in {
    animation: ticketEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.ticket-border {
    position: relative;
    overflow: hidden;
}

/* Subtle Shimmer Effect on the Golden Border */
.ticket-border::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 4s infinite linear;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}
/* फ्लिपबुक ओवरले को सबसे ऊपर रखने के लिए */
#flipbookOverlay {
    z-index: 9999 !important; /* इसे मोडल से ज्यादा रखना है */
}

/* बुक डिटेल मोडल को थोड़ा नीचे रखने के लिए */
.modal-overlay {
    z-index: 9000 !important;
}
/* बुक कार्ड को रिलेटिव रखना ज़रूरी है ताकि पर्दा इसके ऊपर फिट हो */
.book-card {
    position: relative;
    overflow: hidden;
}

/* काला पर्दा जो माउस ले जाने पर दिखेगा */
.coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* डार्क शेड */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* शुरू में गायब रहेगा */
    transition: opacity 0.4s ease;
    z-index: 10;
    pointer-events: none; /* ताकि ये क्लिक में बाधा न डाले */
}

/* जब माउस बुक पर जाए (Hover), तब पर्दा दिखे */
.book-card:hover .coming-soon-overlay {
    opacity: 1;
}

/* पर्दे के अंदर का टेक्स्ट */
.overlay-text {
    color: #FFD700; /* गोल्डन कलर */
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    border: 2px solid #FFD700;
    padding: 10px;
    transform: rotate(-10deg); /* तिरछा स्टाइल */
    text-transform: uppercase;
}