/* ============================================
   Valentine's Day Surprise Website
   Color Theme: Pink/Rose + White
   ============================================ */

:root {
    --primary: #FF6B9D;
    --primary-dark: #E85A8A;
    --secondary: #FFB6C1;
    --accent: #FFFFFF;
    --text-dark: #8B3A62;
    --text-light: #FFFFFF;
    --bg-gradient: linear-gradient(135deg, #FFF5F7 0%, #FFE4EC 100%);
    --shadow: 0 10px 40px rgba(255, 107, 157, 0.2);
    --shadow-hover: 0 15px 50px rgba(255, 107, 157, 0.3);
}

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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Screen Management
   ============================================ */

.screen {
    display: none;
    min-height: 100vh;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.hidden {
    display: none !important;
}

/* ============================================
   Screen 1: Login Page
   ============================================ */

#login-screen {
    background: var(--bg-gradient);
    padding: 20px;
}

.login-container {
    background: var(--accent);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.6s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.lock-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent);
}

.login-header h1 {
    color: var(--text-dark);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle {
    color: #999;
    font-size: 0.9rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.hint-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    background: transparent;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hint-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--accent);
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #EEE;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #FAFAFA;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary);
}

.hint-tooltip {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--accent);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
    position: relative;
}

.hint-tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.error-message {
    background: #FFE4E4;
    color: #D63031;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease;
}

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

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

/* ============================================
   Screen 2: Valentine Question Page
   ============================================ */

#question-screen {
    background: linear-gradient(135deg, #FFF0F3 0%, #FFD6E0 50%, #FFACC7 100%);
    position: relative;
    overflow: hidden;
}

.hearts-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: floatUp linear infinite;
    opacity: 0.6;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.question-container {
    text-align: center;
    z-index: 10;
    padding: 20px;
}

.question-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.5rem, 8vw, 5rem);
    color: var(--text-dark);
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

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

.question-subtitle {
    color: var(--text-dark);
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 50px;
}

.buttons-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.answer-btn {
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yes-btn {
    background: linear-gradient(135deg, #FF6B9D, #FF4757);
    color: var(--accent);
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.4);
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.1); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}

.yes-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 71, 87, 0.5);
}

.heart-icon {
    display: inline-block;
    animation: bounce 0.6s ease infinite alternate;
}

.heart-icon:last-child {
    animation-delay: 0.3s;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

.no-btn {
    background: #EEE;
    color: #666;
    position: absolute;
    transition: all 0.15s ease;
}

.no-btn:hover {
    background: #DDD;
}

/* ============================================
   Screen 3: Celebration/Carousel Page
   ============================================ */

#celebration-screen {
    background: linear-gradient(135deg, #FFF5F7 0%, #FFD6E8 50%, #FFACC7 100%);
    padding: 20px;
    flex-direction: column;
}

.celebration-container {
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.celebration-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--text-dark);
    margin-bottom: 30px;
    animation: fadeInDown 1s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.carousel {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 9 / 13;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(139, 58, 98, 0.2);
    background: var(--accent);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFE4EC, #FFB6C1);
}

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

.carousel-slide .placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    opacity: 0.6;
}

.carousel-slide .placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
}

.carousel-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background: var(--primary);
    color: var(--accent);
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(139, 58, 98, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.music-controls {
    margin-bottom: 30px;
}

.music-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 50px;
    color: var(--accent);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 157, 0.3);
}

.music-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 157, 0.4);
}

.music-btn.playing {
    background: linear-gradient(135deg, #FF4757, #FF6B81);
}

.love-message {
    font-size: 1.1rem;
    color: var(--text-dark);
    opacity: 0.8;
    font-style: italic;
}

/* ============================================
   Confirmation Modal
   ============================================ */

.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.confirm-modal.hidden {
    display: none !important;
}

.confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
}

.confirm-box {
    position: relative;
    z-index: 1;
    background: #FFF;
    padding: 40px 35px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s ease;
}

.confirm-text {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 30px;
    line-height: 1.3;
}

.confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.confirm-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-yes {
    background: linear-gradient(135deg, #FF6B9D, #FF4757);
    color: #FFF;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.35);
}

.confirm-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 71, 87, 0.45);
}

.confirm-no {
    background: #F0F0F0;
    color: #666;
}

.confirm-no:hover {
    background: #E5E5E5;
}

/* ============================================
   Bonus Button & Gallery Modal
   ============================================ */

.bonus-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #FF6B9D, #FF4757);
    border: none;
    border-radius: 50px;
    color: #FFF;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 25px rgba(255, 71, 87, 0.4);
    z-index: 50;
    animation: wiggle 2s ease-in-out infinite;
    transition: transform 0.2s ease;
}

.bonus-btn:hover {
    animation: none;
    transform: scale(1.08);
}

.bonus-emoji {
    font-size: 1.2rem;
    animation: peekBounce 1.5s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes peekBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Modal */
.bonus-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.bonus-modal.hidden {
    display: none !important;
}

.bonus-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.bonus-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 30px;
    max-width: 700px;
    width: 90%;
}

.bonus-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #FFF;
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 2;
}

.bonus-close:hover {
    background: var(--primary);
    color: #FFF;
    transform: rotate(90deg);
}

.bonus-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    color: #FFF;
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bonus-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.bonus-image-container {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #FFE4EC, #FFB6C1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.bonus-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: bonusReveal 0.4s ease;
}

@keyframes bonusReveal {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bonus-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: #FFF;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.bonus-nav {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    color: #FFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.bonus-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .login-container {
        padding: 40px 25px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .buttons-container {
        flex-direction: column;
        align-items: center;
    }

    .answer-btn {
        width: 200px;
    }

    .no-btn {
        position: relative !important;
        left: auto !important;
        top: auto !important;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 1.5rem;
    }

    .carousel {
        border-radius: 15px;
    }

    .carousel-wrapper {
        flex-direction: column;
    }

    .carousel-btn {
        display: none;
    }

    .music-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .bonus-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .bonus-nav {
        width: 36px;
        height: 36px;
    }
}

/* Touch-friendly carousel on mobile */
@media (hover: none) and (pointer: coarse) {
    .no-btn {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        opacity: 0.5;
        pointer-events: none;
    }

    .carousel {
        touch-action: pan-x;
    }
}
