/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #f8e8f5 50%, #f0d9e7 100%);
    min-height: 100vh;
    color: #6b4c57;
    overflow-x: hidden;
}

/* Birthday Lock Overlay */
.lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffeef8 0%, #f8e8f5 50%, #f0d9e7 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.lock-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(212, 86, 122, 0.2);
    border: 2px solid rgba(212, 86, 122, 0.3);
    max-width: 400px;
    width: 90%;
    animation: fadeInScale 1s ease-out;
}

.lock-icon {
    font-size: 4rem;
    color: #d4567a;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.lock-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    font-weight: 700;
    color: #d4567a;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(212, 86, 122, 0.2);
}

.lock-subtitle {
    font-size: 1rem;
    color: #8b6b7a;
    margin-bottom: 30px;
    font-style: italic;
}

.birthday-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-direction: column;
}

#birthdayInput {
    padding: 15px;
    border: 2px solid rgba(212, 86, 122, 0.3);
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    color: #6b4c57;
    transition: all 0.3s ease;
}

#birthdayInput:focus {
    outline: none;
    border-color: #d4567a;
    box-shadow: 0 0 10px rgba(212, 86, 122, 0.3);
}

.unlock-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #d4567a, #b8456a);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.unlock-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 86, 122, 0.4);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
    animation: shake 0.5s ease-in-out;
}

.hidden {
    display: none !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

/* Header styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

.main-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    font-weight: 700;
    color: #d4567a;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(212, 86, 122, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    color: #8b6b7a;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Countdown display */
.countdown-display {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
}

/* Unlock info section */
.unlock-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(212, 86, 122, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(212, 86, 122, 0.2);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.unlock-message {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    font-weight: 600;
    color: #d4567a;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(212, 86, 122, 0.2);
}

.unlock-subtitle {
    font-size: 1rem;
    color: #8b6b7a;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(212, 86, 122, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.time-remaining {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.time-unit {
    text-align: center;
    min-width: 80px;
}

.time-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 600;
    color: #d4567a;
    line-height: 1;
    margin-bottom: 5px;
}

.time-label {
    font-size: 0.9rem;
    color: #8b6b7a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Days grid */
.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.day-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.day-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 86, 122, 0.1), transparent);
    transition: left 0.5s ease;
}

.day-card:hover::before {
    left: 100%;
}

.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(212, 86, 122, 0.2);
    border-color: #d4567a;
}

.day-card.unlocked {
    background: linear-gradient(135deg, #d4567a, #e8739f);
    color: white;
    box-shadow: 0 10px 25px rgba(212, 86, 122, 0.3);
}

.day-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.5);
}

.day-card.current {
    background: linear-gradient(135deg, #ff6b9d, #ffa8cc);
    color: white;
    animation: pulse 2s infinite;
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.5);
}

.day-number {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.day-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Current day content */
.current-day-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 15px 40px rgba(212, 86, 122, 0.1);
    backdrop-filter: blur(10px);
    animation: fadeIn 1s ease-out;
}

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

.day-content h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: #d4567a;
    margin-bottom: 20px;
}

.day-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #6b4c57;
    margin-bottom: 20px;
}

/* Interactive elements */
.hug-button {
    background: linear-gradient(135deg, #ff6b9d, #d4567a);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 10px;
    position: relative;
    overflow: hidden;
}

.hug-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(212, 86, 122, 0.3);
}

.hug-button:active {
    transform: scale(0.95);
}

/* Music toggle */
.music-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.music-btn {
    background: linear-gradient(135deg, #d4567a, #e8739f);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 86, 122, 0.3);
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(212, 86, 122, 0.4);
}

.music-btn.playing {
    animation: musicPulse 1.5s infinite;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #ffeef8, #f8e8f5);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #d4567a;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff6b9d;
}

.modal-body {
    padding: 40px;
}

/* Day 21 special styles */
.day21-content {
    background: linear-gradient(135deg, #ff6b9d, #d4567a);
    color: white;
    text-align: center;
    padding: 60px 40px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.day21-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.day21-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.day21-message {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

/* Confetti canvas */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1500;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes heartFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .time-remaining {
        gap: 15px;
    }
    
    .time-number {
        font-size: 2rem;
    }
    
    .days-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 15px;
    }
    
    .day-card {
        padding: 15px;
    }
    
    .day-number {
        font-size: 1.5rem;
    }
    
    .day-title {
        font-size: 0.8rem;
    }
    
    .current-day-content {
        margin: 15px;
        padding: 20px;
    }
    
    .day-content h2 {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 30px 20px;
    }
    
    .day21-title {
        font-size: 2.2rem;
    }
    
    .day21-message {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .countdown-display {
        padding: 20px;
    }
    
    .time-number {
        font-size: 1.8rem;
    }
    
    .time-label {
        font-size: 0.8rem;
    }
    
    .days-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .music-toggle {
        bottom: 20px;
        right: 20px;
    }
    
    .music-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}

/* Special effects */
.heart-particle {
    position: absolute;
    color: #ff6b9d;
    font-size: 1.5rem;
    animation: heartFloat 3s ease-in-out infinite;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

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

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(212, 86, 122, 0.3);
    border-radius: 50%;
    border-top-color: #d4567a;
    animation: spin 1s ease-in-out infinite;
}

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