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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
    -webkit-touch-callout: none; /* Prevent callout on iOS */
}

.container {
    width: 100%;
    max-width: 700px;
}

/* Welcome Page */
.welcome-container {
    background: #1e1e2e;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.5s ease-in;
    border: 1px solid rgba(100, 200, 255, 0.2);
}

.welcome-container h1 {
    color: #64c8ff;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.5);
}

.welcome-message {
    margin: 30px 0;
    line-height: 1.8;
    color: #e0e0e0;
}

.welcome-message p {
    margin: 15px 0;
    font-size: 1.1em;
}

/* Question Page */
.question-container {
    background: #1e1e2e;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease-in;
    border: 1px solid rgba(100, 200, 255, 0.2);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #2a2a3e;
    border-radius: 10px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #64c8ff 0%, #00d4aa 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.5);
}

.question-header h2 {
    color: #64c8ff;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 15px rgba(100, 200, 255, 0.3);
}

.question-content h3 {
    color: #e0e0e0;
    font-size: 1.5em;
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin: 25px 0;
}

.form-control {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: 2px solid #3a3a4e;
    border-radius: 10px;
    transition: all 0.3s;
    background: #2a2a3e;
    color: #e0e0e0;
}

.form-control:focus {
    outline: none;
    border-color: #64c8ff;
    box-shadow: 0 0 15px rgba(100, 200, 255, 0.3);
}

.hint {
    background: #2a2a3e;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    color: #a0a0b0;
    border: 1px solid rgba(100, 200, 255, 0.2);
}

.error-message {
    background: #3e1e1e;
    color: #ff6b6b;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #ff4444;
}

/* Reveal Page */
.reveal-container {
    background: linear-gradient(135deg, #0a1128 0%, #1a1f3a 50%, #0f1e2e 100%);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(0, 212, 170, 0.2);
    text-align: center;
    animation: fadeIn 0.5s ease-in, auroraGlow 8s ease-in-out infinite;
    border: 2px solid rgba(100, 200, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* Crack Screen Page */
.crack-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f1e2e 50%, #0a0a1a 100%);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    animation: fadeIn 0.5s ease-in;
    border: 2px solid rgba(100, 200, 255, 0.3);
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.crack-container.shake {
    animation: shake 0.5s ease-in-out;
}

.crack-container.shatter {
    animation: shatterAnimation 1.5s ease-out forwards;
}

.crack-content {
    position: relative;
    z-index: 2;
}

.mystery-text {
    color: #ff6b6b;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.8), 0 0 60px rgba(255, 107, 107, 0.5);
    animation: pulse 2s infinite;
}

.mystery-subtext {
    color: #ffa500;
    font-size: 1.8em;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(255, 165, 0, 0.6);
}

.tap-instruction {
    color: #64c8ff;
    font-size: 1.2em;
    margin: 30px 0;
    text-shadow: 0 0 15px rgba(100, 200, 255, 0.5);
    animation: fadeInOut 2s infinite;
}

.click-counter {
    color: #00d4aa;
    font-size: 2em;
    font-weight: bold;
    margin-top: 30px;
    text-shadow: 0 0 20px rgba(0, 212, 170, 0.7);
}

.crack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.crack-overlay.shattered {
    animation: explode 1.5s ease-out forwards;
}

.crack {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    background-size: cover;
    background-position: center;
    mix-blend-mode: screen;
}

.crack.visible {
    opacity: 0.8;
}

/* Individual crack patterns using CSS */
.crack-1 {
    background: linear-gradient(45deg, transparent 48%, rgba(255, 255, 255, 0.3) 48%, rgba(255, 255, 255, 0.3) 52%, transparent 52%);
    transform: rotate(15deg);
}

.crack-2 {
    background: linear-gradient(-60deg, transparent 48%, rgba(255, 255, 255, 0.4) 48%, rgba(255, 255, 255, 0.4) 52%, transparent 52%);
    transform: rotate(-20deg);
}

.crack-3 {
    background: linear-gradient(120deg, transparent 48%, rgba(255, 255, 255, 0.3) 48%, rgba(255, 255, 255, 0.3) 52%, transparent 52%);
    transform: rotate(30deg);
}

.crack-4 {
    background: radial-gradient(circle at 30% 40%, transparent 20%, rgba(255, 255, 255, 0.2) 20%, rgba(255, 255, 255, 0.2) 21%, transparent 21%);
}

.crack-5 {
    background: linear-gradient(-45deg, transparent 48%, rgba(255, 255, 255, 0.35) 48%, rgba(255, 255, 255, 0.35) 52%, transparent 52%);
    transform: rotate(10deg);
}

.crack-6 {
    background: radial-gradient(circle at 70% 60%, transparent 15%, rgba(255, 255, 255, 0.25) 15%, rgba(255, 255, 255, 0.25) 16%, transparent 16%);
}

.crack-7 {
    background: linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.3) 48%, rgba(255, 255, 255, 0.3) 52%, transparent 52%);
    transform: rotate(-45deg);
}

.crack-8 {
    background: linear-gradient(150deg, transparent 48%, rgba(255, 255, 255, 0.4) 48%, rgba(255, 255, 255, 0.4) 52%, transparent 52%);
    transform: rotate(25deg);
}

.ripple {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: rippleEffect 1s ease-out forwards;
    pointer-events: none;
    z-index: 3;
}

@keyframes rippleEffect {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px) rotate(-1deg); }
    20%, 40%, 60%, 80% { transform: translateX(10px) rotate(1deg); }
}

@keyframes shatterAnimation {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes explode {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(3);
    }
}

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

/* Video Teaser Page */
.video-teaser-container {
    background: linear-gradient(135deg, #0a1128 0%, #1a1f3a 50%, #0f1e2e 100%);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(100, 200, 255, 0.2);
    text-align: center;
    animation: fadeIn 0.5s ease-in;
    border: 2px solid rgba(100, 200, 255, 0.3);
    position: relative;
}

.teaser-header h1 {
    color: #00d4aa;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(0, 212, 170, 0.8), 0 0 60px rgba(100, 200, 255, 0.5);
}

.teaser-header h2 {
    color: #64c8ff;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.6);
}

.video-wrapper {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(100, 200, 255, 0.3);
}

.video-wrapper video {
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 15px;
}

.continue-section {
    margin-top: 30px;
}

.video-instruction {
    color: #e0e0e0;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(100, 200, 255, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(100, 200, 255, 0.6), 0 0 40px rgba(0, 212, 170, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 15px rgba(100, 200, 255, 0.4);
    }
}

.reveal-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 170, 0.1) 0%, transparent 70%);
    animation: auroraMove 15s ease-in-out infinite;
    pointer-events: none;
}

.celebration h1 {
    color: #00d4aa;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 0 0 30px rgba(0, 212, 170, 0.8), 0 0 60px rgba(100, 200, 255, 0.5);
    position: relative;
    z-index: 1;
}

.celebration h2 {
    color: #64c8ff;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.6);
    position: relative;
    z-index: 1;
}

.reveal-content {
    margin: 40px 0;
    position: relative;
    z-index: 1;
}

.surprise-message {
    margin: 30px 0;
}

.surprise-message h3 {
    color: #00d4aa;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-shadow: 0 0 25px rgba(0, 212, 170, 0.7);
}

.big-text {
    font-size: 1.8em;
    font-weight: bold;
    color: #64c8ff;
    margin: 25px 0;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.6);
    line-height: 1.6;
}

.surprise-message p {
    margin: 15px 0;
    line-height: 1.8;
    color: #e0e0e0;
    font-size: 1.1em;
}

.reveal-image {
    margin: 30px 0;
}

.reveal-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 170, 0.3);
    border: 2px solid rgba(0, 212, 170, 0.3);
}

.reveal-video {
    margin: 30px 0;
}

.reveal-video video {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 170, 0.3);
    border: 2px solid rgba(0, 212, 170, 0.3);
}

.celebration-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid rgba(100, 200, 255, 0.3);
    position: relative;
    z-index: 1;
}

.celebration-footer p {
    font-size: 1.5em;
    color: #00d4aa;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 212, 170, 0.6);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 10px;
    position: relative;
    z-index: 1;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #64c8ff 0%, #00d4aa 100%);
    color: #0a1128;
    box-shadow: 0 5px 15px rgba(100, 200, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 200, 255, 0.6), 0 0 30px rgba(0, 212, 170, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(100, 200, 255, 0.4);
}

.btn-secondary {
    background: #2a2a3e;
    color: #64c8ff;
    border: 2px solid rgba(100, 200, 255, 0.3);
}

.btn-secondary:hover {
    background: #3a3a4e;
    border-color: rgba(100, 200, 255, 0.6);
    box-shadow: 0 0 20px rgba(100, 200, 255, 0.3);
}

.btn-secondary:active {
    background: #2a2a3e;
    transform: scale(0.98);
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes auroraGlow {
    0%, 100% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                    0 0 100px rgba(0, 212, 170, 0.2),
                    0 0 150px rgba(100, 200, 255, 0.1);
    }
    50% {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                    0 0 120px rgba(100, 200, 255, 0.3),
                    0 0 180px rgba(0, 212, 170, 0.2);
    }
}

@keyframes auroraMove {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(10%, -10%) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translate(-10%, 10%) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translate(10%, 10%) rotate(270deg);
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .welcome-container,
    .question-container,
    .reveal-container,
    .video-teaser-container,
    .crack-container {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .welcome-container h1,
    .celebration h1,
    .teaser-header h1 {
        font-size: 1.8em;
    }
    
    .teaser-header h2,
    .celebration h2 {
        font-size: 1.2em;
    }
    
    .question-content h3 {
        font-size: 1.2em;
    }
    
    .mystery-text {
        font-size: 2.2em;
    }
    
    .mystery-subtext {
        font-size: 1.4em;
    }
    
    .click-counter {
        font-size: 1.5em;
    }
    
    .big-text {
        font-size: 1.4em;
    }
    
    .surprise-message h3 {
        font-size: 1.5em;
    }
    
    .welcome-message p,
    .surprise-message p,
    .video-instruction {
        font-size: 1em;
    }
    
    /* Touch-friendly buttons */
    .btn {
        padding: 18px 35px;
        font-size: 1.1em;
        min-height: 48px; /* Minimum touch target size */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve form inputs for mobile */
    .form-control {
        padding: 18px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px;
    }
    
    /* Video container optimizations */
    .video-wrapper {
        margin: 20px 0;
    }
    
    .video-wrapper video,
    .reveal-video video {
        border-radius: 10px;
    }
    
    /* Reduce heavy animations on mobile for better performance */
    .reveal-container::before {
        animation: none;
    }
    
    /* Better spacing for mobile */
    .celebration-footer {
        margin-top: 30px;
        padding-top: 20px;
    }
    
    .celebration-footer p {
        font-size: 1.2em;
    }
    
    /* Crack screen mobile optimizations */
    .crack-container {
        min-height: 400px;
        padding: 40px 20px;
    }
    
    .tap-instruction {
        font-size: 1.1em;
    }
    
    /* Better image sizing on mobile */
    .reveal-image img {
        border-radius: 10px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .welcome-container,
    .question-container,
    .reveal-container,
    .video-teaser-container,
    .crack-container {
        padding: 25px 15px;
    }
    
    .welcome-container h1,
    .celebration h1,
    .teaser-header h1 {
        font-size: 1.5em;
    }
    
    .teaser-header h2,
    .celebration h2 {
        font-size: 1em;
    }
    
    .mystery-text {
        font-size: 1.8em;
    }
    
    .mystery-subtext {
        font-size: 1.2em;
    }
    
    .big-text {
        font-size: 1.2em;
    }
    
    .btn {
        padding: 15px 25px;
        font-size: 1em;
        margin: 5px;
    }
    
    .crack-container {
        min-height: 350px;
    }
}
