@font-face {
    font-family: 'Varela Round';
    src: url('./VarelaRound-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Varela Round', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent; /* 3D background will be shown instead */
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    direction: rtl;
    position: relative;
    margin: 0;
    padding: 0;
}

/* 3D Background Container - Always behind everything */
#background-3d-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    pointer-events: none;
}

/* All content should be above the 3D background */
#quizGate, #passwordGate, .demo-app, #demoApp, .gate-container, .gate-content, 
.quiz-container, .quiz-layout, .question-section, .photoGallery, .gallery-container {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* Confetti Container Styles */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Initial Screen Styles */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: transparent; /* 3D background will be shown instead */
    position: relative;
    overflow: hidden;
}

.content {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 60px 40px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    width: 100%;
    position: relative;
    animation: contentFloat 6s ease-in-out infinite;
}

@keyframes contentFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

.main-headline {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 30%, #4ecdc4 70%, #45b7aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(78, 205, 196, 0.4);
    letter-spacing: 2px;
    line-height: 1.1;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 40px rgba(78, 205, 196, 0.4); }
    100% { text-shadow: 0 0 60px rgba(0, 21, 255, 0.6), 0 0 80px rgba(78, 205, 196, 0.3); }
}

.sub-headline {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.cta-button {
    background:
    linear-gradient(135deg, #4ecdc4 0%, #45b7aa 50%, #00276d 100%), linear-gradient(135deg, #0046fd 0%, #00baff 50%, #1514ff 100%);
    background-blend-mode: screen;
    background-size: 200% 200%;
    color: black;
    padding: 20px 20px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 10px 30px rgba(78, 205, 196, 0.5),
        0 5px 15px rgba(255, 215, 0, 0.3),
        0 0 50px rgba(78, 205, 196, 0.2);
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    animation: ctaButtonShimmer 4s ease-in-out infinite;
    cursor: pointer;
}

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

.cta-button::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);
    transition: all 0.6s ease;
    opacity: 0;
}

.cta-button:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 20px 50px rgba(78, 205, 196, 0.8),
        0 15px 30px rgba(0, 89, 255, 0.5),
        0 0 80px rgba(78, 205, 196, 0.4),
        0 0 120px rgba(255, 215, 0, 0.2);
    border-color: rgba(0, 128, 255, 0.6);
    background-position: 100% 50%;
}

.cta-button:hover::before {
    opacity: 1;
    animation: buttonShine 1.5s ease-in-out;
}

@keyframes buttonShine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.hidden-content {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.hidden-content.show {
    opacity: 1;
    transform: translateY(0);
}

.zoom-text {
    font-size: 1.5rem;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.8s ease-out;
}

@keyframes zoomIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.typewriter-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border-right: 2px solid #ffd700;
    white-space: nowrap;
    animation: typewriter 2s steps(40, end), blink-caret 0.75s step-end infinite;
    width: 0;
    animation-fill-mode: forwards;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #ffd700; }
}

/* Demo specific styles */
.demo-app {
    background: linear-gradient(135deg, #0a0a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

/* Millionaire Quiz Background */
.demo-app::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 30px 30px;
    animation: starTwinkle 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

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

.demo-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-header h2 {
    color: #ffd700;
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.demo-header p {
    color: #e0e0e0;
    font-size: 1.1rem;
}

.hidden {
    display: none !important;
}

/* Gate Styles */
.gate-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    max-height: 100vh;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

/* Center quizGate specifically */
#quizGate {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
}

.gate-content {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    max-width: 1200px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Quiz container and all quiz elements should be transparent to show 3D background */
.quiz-container, .question-container, .options-container, 
.quiz-layout, .question-section, .question-text {
    background: transparent;
    position: relative;
    z-index: 1;
}

/* Question text should have semi-transparent background like in app */
.question-text {
    background: rgba(0, 0, 0, 0.3) !important;
}




.quiz-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex: 1;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    background: transparent;
}

.question-section {
    flex: 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    max-height: 100%;
    overflow: hidden;
    background: transparent;
}

.fire-progress {
    align-self: center;

    padding-top: 30px;
    flex: 1;
    min-width: 200px;
    margin-top: 10px;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.5;
    text-align: center;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Text question styling - Millionaire style */
.text-question .question-text {
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: 0.3px;
    line-height: 1.5;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: 3px solid #5d8aa8;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    font-family: 'Varela Round', Arial, sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin-bottom: 15px;
}

.quiz-progress {
    font-size: 1.2rem;
    color: #ffd700;
    font-weight: bold;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid #ffd700;
    margin-top: 20px;
}
/* Fire Progress Styles */
.fire-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
    background: transparent; /* הסרת הרקע */
    border: none; /* הסרת הגבול */
}

.circular-progress-container {
    position: relative;
    width: 150px; /* הגדלנו מעט את הקונטיינר */
    height: 150px;
    background: transparent; /* הסרת הרקע */
    border: none; /* הסרת הגבול */
}

.circular-progress-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180px;
    height: 180px;
    transform: translate(-50%, -50%);
    background: transparent; /* הסרת הרקע */
    border-radius: 50%;
    animation: fire-aura 2s ease-in-out infinite alternate;
    z-index: -1;
}

.circular-progress-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    background: transparent; /* הסרת הרקע */
    border-radius: 50%;
    animation: fire-aura 3s ease-in-out infinite alternate-reverse;
    z-index: -2;
}

/* עיגולים קטנים סביב הטבעת */
.fire-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    transform: rotate(-15deg); /* זווית כללית לאש */
}

@keyframes fireParticleFloat {
    0% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 1; 
    }
    25% { 
        transform: translate(-50%, -50%) translateY(-15px) translateX(10px) scale(0.9) rotate(90deg); 
        opacity: 0.9; 
    }
    50% { 
        transform: translate(-50%, -50%) translateY(-30px) translateX(20px) scale(0.8) rotate(180deg); 
        opacity: 0.8; 
    }
    75% { 
        transform: translate(-50%, -50%) translateY(-45px) translateX(15px) scale(0.6) rotate(270deg); 
        opacity: 0.6; 
    }
    100% { 
        transform: translate(-50%, -50%) translateY(-60px) translateX(25px) scale(0) rotate(360deg); 
        opacity: 0; 
    }
}

@keyframes fire-aura {
    0% {
        transform: translate(-50%, -50%) scale(0.8) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(180deg);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3) rotate(360deg);
        opacity: 0.7;
    }
}

/* גרדיאנט יפה ללהבה */
.progress-ring__circle {
    stroke: url(#fire-gradient);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease-out;
    stroke-dashoffset: 327;
    stroke-width: 16; /* קו עבה יותר ללהבות */
    opacity: 0; /* הסתר את הקו - רק אייקוני להבות */
    /* אפקט הזוהר הראשי והעוצמתי */
    filter: 
        drop-shadow(0 0 8px #ffd700) 
        drop-shadow(0 0 15px #ff9800) 
        drop-shadow(0 0 25px #ff5722)
        drop-shadow(0 0 35px #ff4500);
    /* אנימציה מורכבת של ריצוד הלהבה */
    animation: fire-flicker 1.2s ease-in-out infinite alternate;
}

.progress-ring {
    transform: rotate(-90deg);
}

/* אנימציה של להבות אמיתיות */
@keyframes fire-flicker {
    0% {
        filter: 
            drop-shadow(0 0 5px #ff1744) 
            drop-shadow(0 0 10px #ff4500) 
            drop-shadow(0 0 20px #ff5722)
            drop-shadow(0 0 30px #ff9800)
            drop-shadow(0 0 40px #ffd700);
    }
    25% {
        filter: 
            drop-shadow(0 0 8px #ff1744) 
            drop-shadow(0 0 15px #ff4500) 
            drop-shadow(0 0 25px #ff5722)
            drop-shadow(0 0 35px #ff9800)
            drop-shadow(0 0 45px #ffd700);
    }
    50% {
        filter: 
            drop-shadow(0 0 12px #ff1744) 
            drop-shadow(0 0 20px #ff4500) 
            drop-shadow(0 0 30px #ff5722)
            drop-shadow(0 0 40px #ff9800)
            drop-shadow(0 0 50px #ffd700);
    }
    75% {
        filter: 
            drop-shadow(0 0 8px #ff1744) 
            drop-shadow(0 0 15px #ff4500) 
            drop-shadow(0 0 25px #ff5722)
            drop-shadow(0 0 35px #ff9800)
            drop-shadow(0 0 45px #ffd700);
    }
    100% {
        filter: 
            drop-shadow(0 0 5px #ff1744) 
            drop-shadow(0 0 10px #ff4500) 
            drop-shadow(0 0 20px #ff5722)
            drop-shadow(0 0 30px #ff9800)
            drop-shadow(0 0 40px #ffd700);
    }
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ff9800;
    animation: text-glow 2s ease-in-out infinite alternate;
    display: none; /* מסתיר את המספור */
}

@keyframes text-glow {
    0% {
        text-shadow: 0 0 10px #ffd700, 0 0 20px #ff9800;
    }
    100% {
        text-shadow: 0 0 15px #ffd700, 0 0 30px #ff9800, 0 0 40px #ff5722;
    }
}

.fire-progress-title {
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

.fire-container {
    position: relative;
    height: 600px;
    background: transparent; /* הסרת הרקע */
    border: none; /* הסרת הגבול */
}


.fire-track {
    position: relative;
    width: 20px;
    height: 100%;
    background: transparent;
    border-radius: 10px;
    margin: 0 auto;
}

.fire-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 50px; /* רוחב הלהבה - עוד יותר קטן */
    height: 0%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 50% 100%, #ffc107, #ff9800, #ff5722, transparent 70%);
    transition: height 1s ease-in-out;
    filter: blur(8px); /* טשטוש יותר רך */
    animation: main-flicker 3s linear infinite;
    z-index: 1;
}

.fire-line::before,
.fire-line::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100%;
    height: 100%;
    transform-origin: bottom center;
    background: inherit;
    filter: blur(8px);
}

.fire-line::before {
    animation: flicker-1 2s linear infinite;
}

.fire-line::after {
    animation: flicker-2 4s linear infinite;
}

@keyframes main-flicker {
    0%, 100% { transform: translateX(-50%) scaleY(1) skew(0deg); }
    50% { transform: translateX(-50%) scaleY(1.05) skew(2deg); }
}

@keyframes flicker-1 {
    0%, 100% { transform: translateX(-50%) scale(1) skew(0deg); opacity: 0.8; }
    25% { transform: translateX(-45%) scale(1.1, 0.9) skew(5deg); opacity: 0.7; }
    50% { transform: translateX(-55%) scale(0.9, 1.1) skew(-5deg); opacity: 0.9; }
    75% { transform: translateX(-50%) scale(1.05, 0.95) skew(3deg); opacity: 0.8; }
}

@keyframes flicker-2 {
    0%, 100% { transform: translateX(-50%) scale(1) skew(0deg); opacity: 0.6; }
    25% { transform: translateX(-55%) scale(0.95, 1.05) skew(-4deg); opacity: 0.7; }
    50% { transform: translateX(-45%) scale(1.05, 0.95) skew(4deg); opacity: 0.5; }
    75% { transform: translateX(-50%) scale(1, 1) skew(-2deg); opacity: 0.6; }
}

.fire-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

@keyframes fireParticleFloat {
    0% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-60px) scale(0); opacity: 0; }
}

/* Option Button Styles - Millionaire with Images */
.option-btn {
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    border: 3px solid #5d8aa8;
    color: white;
    padding: 5px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.option-image-container {
    padding-bottom: 6px;
    padding-top: 6px;

    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

.option-image {
    max-width: 100%;
    max-height: 100%;
    width: 60%;
   
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

.option-btn:hover .option-image {
    transform: scale(1.05);
}

.option-text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    height: 100%;
    text-align: center;
    width: 100%;
    min-height: 100%;
}

.option-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.option-text {
    font-size: 1.1rem;
    font-weight: 300;
    color: #ffffff;
    line-height: 1.4;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-height: 100%;
}

/* Text-only options styling - Millionaire style */
.text-option {
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    border: 3px solid #5d8aa8;
    height: auto;
    min-height: 70px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    clip-path: polygon(0 0, 97% 0, 100% 50%, 97% 100%, 0 100%, 3% 50%);
    transition: all 0.3s ease;
    max-width: 100%;
}

.text-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: #ffd700;
}

.text-option .option-text {
    font-size: 1.15rem;
    font-weight: 200;
    letter-spacing: 0.5px;
    text-align: center;
    color: #ffffff;
    line-height: 1.3;
    flex: 1;
    padding: 0 25px;
    font-family: 'Varela Round', Arial, sans-serif;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.text-option .option-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 5px 0;
    flex: 1;
}

.text-option .option-icon {
    display: none; /* הסר אייקונים לחידות טקסט */
}

.text-option .option-letter {
    display: none !important;
}

.option-letter {
    display: none !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 2;
    letter-spacing: 0.5px;
}

/* --- Suspense, Correct, and Incorrect States --- */

.option-btn.selected {
    border-color: #ff9900;
    background: linear-gradient(180deg, #4a3c28 0%, #6c5837 100%);
    animation: suspensePulse 0.8s infinite;
}

@keyframes suspensePulse {
    0% { transform: scale(1); box-shadow: 0 0 15px #ff9900; }
    50% { transform: scale(1.03); box-shadow: 0 0 30px #ff9900; }
    100% { transform: scale(1); box-shadow: 0 0 15px #ff9900; }
}

.option-btn.correct {
    background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
    border-color: #2E7D32;
    box-shadow: 0 0 25px #4CAF50;
    animation: none;
}

.option-btn.incorrect {
    background: linear-gradient(180deg, #f44336 0%, #d32f2f 100%);
    border-color: #b71c1c;
    box-shadow: 0 0 25px #f44336;
    animation: none;
}

/* Text option states */
.text-option.selected {
    border-color: #ff9900;
    background: linear-gradient(180deg, #4a3c28 0%, #6c5837 100%);
    animation: textSuspensePulse 0.8s infinite;
}

@keyframes textSuspensePulse {
    0% { transform: translateY(-2px) scale(1); box-shadow: 0 8px 25px rgba(255, 153, 0, 0.3); }
    50% { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 35px rgba(255, 153, 0, 0.5); }
    100% { transform: translateY(-2px) scale(1); box-shadow: 0 8px 25px rgba(255, 153, 0, 0.3); }
}

.text-option.correct {
    background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
    border-color: #2E7D32;
    box-shadow: 0 0 25px #4CAF50;
    animation: none;
}

.text-option.incorrect {
    background: linear-gradient(180deg, #f44336 0%, #d32f2f 100%);
    border-color: #b71c1c;
    box-shadow: 0 0 25px #f44336;
    animation: none;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 1rem;
    margin-left: auto;
    margin-right: auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
    justify-items: center;
    max-width: 100%;
}

/* Text questions container - 2 columns layout */
.text-questions-container .options-container {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto 1rem;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
}

.quiz-message {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: white; padding: 20px 40px; border-radius: 20px; font-size: 1.3rem;
    font-weight: bold; z-index: 1000; box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    animation: messagePop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.quiz-message.success { background: rgba(76, 175, 80, 0.95); }
.quiz-message.error { background: rgba(244, 67, 54, 0.95); }

@keyframes messagePop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.quiz-result h2 { color: #ff6b6b; font-size: 1.5rem; margin-bottom: 1rem; }
.restart-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white; border: none; padding: 15px 30px;
    border-radius: 25px; font-size: 1.2rem; cursor: pointer;
}

/* --- 💅 START OF CORRECTED GALLERY STYLES 💅 --- */
#photoGallery {
    background: linear-gradient(135deg, #0a0a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px 10px;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 900px; /* Optional: constrain width on large screens */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

#galleryGrid {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-title {
    color: #ffd700;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.logout-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.gallery-grid .gallery-container {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 5;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Image Slider Styles */
.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.slide.prev {
    transform: translateX(-100%);
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.slide:hover .main-image {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.main-image:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Ensure portrait images are properly centered */
.main-image[style*="aspect-ratio"] {
    object-fit: contain;
    object-position: center;
    background: rgba(0, 0, 0, 0.1);
}

/* For portrait images specifically */
.slide img[src*="IMG_"] {
    object-fit: cover;
    object-position: center center;
    width: 100%;
    height: 100%;
}

/* Image Overlay - Always visible */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 20px 20px;
    border-radius: 0 0 15px 15px;
    transform: translateY(0); /* תמיד נראה */
    transition: transform 0.3s ease;
}

/* Click hint for main image */
.image-overlay::after {
   
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.slide:hover .image-overlay::after {
    opacity: 1;
}

.slide:hover .image-overlay {
    transform: translateY(0); /* נשאר נראה גם ב-hover */
}

.image-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.image-description {
    font-size: 1rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Gallery Progress Bar */
.gallery-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 15px 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ff6b6b);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 0 0 15px 15px;
}

.gallery-main-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-main-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-main-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    cursor: default;
}

.image-modal img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2001;
}

.image-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.gallery-nav.prev {
    right: 16px;
}

.gallery-nav.next {
    left: 16px;
}

.gallery-counter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    width: 100%;
    box-sizing: border-box;
}

.thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    opacity: 0.7;
}

.thumbnail:hover {
    transform: scale(1.1);
    opacity: 1;
}

.thumbnail.active {
    border-color: #ffd700;
    opacity: 1;
    transform: scale(1.1);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-swipe-hint {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    z-index: 10;
    animation: fadeInOut 3s ease-in-out;
}

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

/* --- 💅 END OF CORRECTED GALLERY STYLES 💅 --- */

/* Fire Circle Icon Animation */
@keyframes fireCirclePulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 8px #ff4500);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        filter: drop-shadow(0 0 12px #ff4500) drop-shadow(0 0 20px #ff6500);
    }
}

.fire-circle-icon {
    position: absolute;
    z-index: 10;
}

.fire-circle-icon img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 8px #ff4500);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 5px;
    
}

.fire-circle-icon:hover img {
    transform: scale(1.3);
    filter: drop-shadow(0 0 15px #ff4500) drop-shadow(0 0 25px #ff6500);
}

.fire-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    animation: fireIconPulse 2s ease-in-out infinite;
}

.fire-icon img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px #ff4500);
    transition: all 0.3s ease;
}

.fire-icon:hover img {
    transform: scale(1.2);
    filter: drop-shadow(0 0 20px #ff4500) drop-shadow(0 0 30px #ff6500);
}

/* Fire Icon Complete Animation */
@keyframes fireIconComplete {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 15px #ff4500);
    }
    25% { 
        transform: translate(-50%, -50%) scale(1.2);
        filter: drop-shadow(0 0 20px #ff4500) drop-shadow(0 0 30px #ff6500);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        filter: drop-shadow(0 0 25px #ff4500) drop-shadow(0 0 35px #ff6500) drop-shadow(0 0 45px #ff8500);
    }
    75% { 
        transform: translate(-50%, -50%) scale(1.3);
        filter: drop-shadow(0 0 30px #ff4500) drop-shadow(0 0 40px #ff6500);
    }
}

/* Firework Spark Animation */
@keyframes fireworkSpark {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* Fire Circle Complete Animation */
@keyframes fireCircleComplete {
    0% {
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 8px #ff4500);
    }
    25% {
        transform: translate(-50%, -50%) scale(1.2);
        filter: drop-shadow(0 0 12px #ff4500) drop-shadow(0 0 20px #ff6500);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        filter: drop-shadow(0 0 15px #ff4500) drop-shadow(0 0 25px #ff6500) drop-shadow(0 0 35px #ff8500);
    }
    75% {
        transform: translate(-50%, -50%) scale(1.3);
        filter: drop-shadow(0 0 18px #ff4500) drop-shadow(0 0 30px #ff6500);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        filter: drop-shadow(0 0 8px #ff4500);
    }
}

.photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 8px;
    color: white;
    font-size: 1.2rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.photo-fallback:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.photo-item:hover::before {
    transform: translateX(100%);
}

/* Photo Viewer Styles */
.photo-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.photo-viewer.hidden {
    display: none !important;
}

.viewer-header {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1001;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#photoCounter {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#viewerImage {
    max-width: 100%;
    max-height: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1001;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.nav-btn.prev {
    right: 20px;
}

.nav-btn.next {
    left: 20px;
}

/* PWA Install Prompt Styles */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #0a0a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    z-index: 1001;
    animation: slideUp 0.5s ease;
    border: 2px solid #ffd700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.install-prompt h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.install-prompt p {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-size: 1rem;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .quiz-layout { 
        flex-direction: row; 
        align-items: flex-start;
        gap: 20px;
    }
    
    .question-section {
        flex: 1;
        order: 2;
    }
    
    .fire-progress { 
        width: 80px;
        max-width: 80px;
        order: 1;
        flex-shrink: 0;
    }
    
    .fire-container {
        height: 100%;
        min-height: 400px;
    }
    
    .fire-track {
        width: 100%;
        height: 100%;
        position: relative;
    }
    
    .fire-line {
        width: 100%;
        height: 0%;
        left: 0;
        transform: none;
        background: linear-gradient(to bottom, #ffc107, #ff9800, #ff5722, transparent 70%);
    }
    
  
    
    .option-image {
        max-width: 100%;
        max-height: 100%;
        width: 60%;
        object-fit: contain;
        object-position: center;
    }
    
    .options-container {
      
        gap: 12px;
    }
    
    /* Ensure portrait images are centered on mobile */
    .main-image {
        object-fit: cover;
        object-position: center center;
    }
    
    .thumbnail-image {
        object-fit: cover;
        object-position: center center;
    }
}

/* Mobile adjustments for very small screens */
@media (max-width: 768px) {
    .quiz-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .fire-progress {
        width: 100%;
        max-width: 300px;
        order: 1;
        margin-bottom: 20px;
        margin-top: 0;
    }
    
    .question-section {
        order: 2;
    }
    
    .fire-container {
        height: auto;
        min-height: auto;
    }
    
    .fire-line {
        width: 80px;
        left: 50%;
        transform: translateX(-50%);
        background: radial-gradient(circle at 50% 100%, #ffc107, #ff9800, #ff5722, transparent 70%);
    }
    
    .option-btn {
      
        padding: 8px;
    }
    
    .options-container {
        grid-template-columns: 1fr;
        gap: 12px;

        overflow-y: auto;
    }
    
    /* Text questions mobile adjustments */
    .text-option {
        height: auto;
        min-height: 60px;
        padding: 8px 12px;
        max-width: 100%;
    }
    
    .text-option .option-text {
        font-size: 0.95rem;
        padding: 0 20px;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .text-option .option-letter {
        display: none !important;
    }
    
    .text-question .question-text {
        font-size: 1rem;
        padding: 10px 15px;
        margin-bottom: 12px;
    }
    
    /* Force 2 columns even on mobile for text questions */
    .text-questions-container .options-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
        margin-bottom: 0.5rem;
    }
    
    .gate-container {
        min-height: auto;
        max-height: 100vh;
        padding: 5px;
        overflow: hidden;
    }
    
    .gate-content {
        padding: 10px;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
    
    .quiz-layout {
        gap: 10px;
    }
    
    /* Mobile click hint */
    .image-overlay::after {
        font-size: 0.7rem;
        padding: 4px 8px;
        top: 8px;
        right: 10px;
    }
    
    .gallery-header {
        padding: 15px;
        margin-bottom: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .gallery-title {
        font-size: 1.5rem;
    }

    .thumbnail {
        width: 50px;
        height: 50px;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .thumbnail {
        width: 45px;
        height: 45px;
    }
}

/* Password Gate Styles */
.password-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px;
    direction: ltr; /* Force LTR for password display */
}

.password-slots-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    direction: ltr; /* Force LTR for password slots */
}

.password-row {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px; /* רווח בין שורות למילים נפרדות */
}

/* Special styling for multi-word passwords */
.password-row:not(:last-child) {
    margin-bottom: 15px; /* רווח גדול יותר בין מילים */
}

/* Removed the line separator - not needed */

.password-slot {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: 3px solid #ffd700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.password-slot::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 ease;
}

.password-slot.filled {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-color: #ffd700;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slotFill 0.5s ease;
    cursor: pointer;
}

.password-slot.filled::before {
    left: 100%;
}

.password-slot.filled:hover {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    border-color: #ffed4e;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

@keyframes slotFill {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.letters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    max-width: 500px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    direction: ltr; /* Force LTR for letter buttons */
}

.letter-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    border: 2px solid #ff8c8c;
    border-radius: 10px;
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.letter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.letter-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252 0%, #e53935 100%);
}

.letter-btn:hover::before {
    transform: translateX(100%);
}

.letter-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.password-error {
    color: #ff6b6b;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    min-height: 25px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Password Title Enhancement */
#passwordGate .gate-title {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px 40px;
    border-radius: 25px;
    border: 3px solid #ffd700;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    font-size: 2.2rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

/* Password Hint Styles */
.password-hint {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    padding: 20px 30px;
    border-radius: 20px;
    border: 2px solid #ffd700;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
    text-align: center;
    animation: hintPulse 2s ease-in-out infinite;
}

.hint-question {
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hint-answer {
    color: #ffffff;
    font-size: 1.1rem;
    opacity: 0.9;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes hintPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 15px 35px rgba(255, 215, 0, 0.2);
    }
}

#passwordGate .gate-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    animation: titleShine 3s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    .options-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
       
        overflow-y: auto;
    }
  
    .option-letter { display: none !important; }
    
    /* Text-only options on mobile */
    .text-option .option-text {
        font-size: 1.0rem;
        font-weight: 200;
        letter-spacing: 0.8px;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .text-option .option-icon {
        font-size: 2rem;
        margin-bottom: 10px;
    }
    
    /* Ensure text options stay thin and 2 columns on very small screens */
    .text-questions-container .options-container {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px;
    }
    
    .text-option {
        max-width: 100%;
        height: auto;
        min-height: 70px;
        padding: 8px 12px;
    }
    .fire-container { height: 300px; }
    
    /* Mobile password styles */
    .password-slot {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .letter-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .letters-container {
        gap: 10px;
        padding: 15px;
    }
    
    .password-row {
        gap: 10px;
    }
    
    #passwordGate .gate-title {
        font-size: 1.8rem;
        padding: 15px 25px;
    }
    
    .password-hint {
        padding: 15px 20px;
        margin-bottom: 20px;
    }
    
    .hint-question {
        font-size: 1.2rem;
    }
    
    .hint-answer {
        font-size: 1rem;
    }
}


/* Installation Success Message */
.install-success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    z-index: 9999;
    animation: fadeIn 0.5s ease;
    padding: 20px;
}

.install-success-content {
    text-align: center;
    color: white;
    padding: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
}

.install-success-content h1 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.install-success-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.home-screen-icon {
    font-size: 4rem;
    margin-top: 20px;
    animation: icon-bounce 2s infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes icon-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Enhanced Gallery Thumbnails */
.thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid transparent;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    padding: 3px;
}

.thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #ffd700, #ff6b6b);
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.15) translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4);
}

.thumbnail:hover::before {
    opacity: 1;
}

.thumbnail.active {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    transform: scale(1.1);
}

.thumbnail.active::before {
    opacity: 1;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.thumbnail:hover .thumbnail-image {
    transform: scale(1.1);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-number {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Gallery Controls Styles */
.gallery-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Skip Quiz Toggle Styles */
.skip-quiz-toggle {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 25px;
    background: #ccc;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-input:checked + .toggle-slider {
    background: #ffd700;
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(25px);
}

.toggle-text {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Password Controls Styles */
.password-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.password-controls .skip-quiz-toggle {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(10px);
}

.password-controls .toggle-text {
    font-size: 1rem;
    color: #ffd700;
}
