:root {
    --primary: #72d4a9;
    --primary-dark: #5ab88e;
    --background: #0A0A0A;
    --surface: #1A1A1A;
    --text: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent: #72d4a9;
    --accent-glow: rgba(114, 212, 169, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    font-size: 4rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: var(--text);
    text-shadow: 0 0 10px var(--accent-glow);
    animation: glow 2s ease-in-out infinite alternate;
}

h1 span {
    color: var(--primary);
    display: block;
    font-size: 3rem;
    margin-top: 0.5rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.christmas-text {
    display: block;
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 1rem;
    font-weight: 500;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    padding: 30px;
}

.door {
    aspect-ratio: 1;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    will-change: transform;
    transform: translateZ(0);
}

.door-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    border-radius: 12px;
    background: var(--surface);
    border: 2px solid rgba(61, 214, 181, 0.1);
    transition: border-color 0.3s ease;
    padding: 15px;
}

.door:hover .door-face {
    border-color: var(--primary);
}

.door-front {
    transform: rotateY(0deg);
}

.door-back {
    transform: rotateY(180deg);
}

.door i {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--primary);
}

.door span {
    color: var(--text-secondary);
    font-size: 2rem;
    margin-top: 15px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.door.opened {
    transform: rotateY(180deg);
}

.message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 40px var(--accent-glow);
    z-index: 1000;
    text-align: center;
    max-width: 90%;
    width: 800px;
    border: 3px solid var(--primary);
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.message-title {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.message-description {
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: pre-line;
    text-align: center;
    margin: 0 auto 15px;
    max-width: 90%;
    font-size: 0.9rem;
}

.message-link {
    display: inline-block;
    background: var(--primary);
    color: var(--background);
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1.5rem;
    transition: transform 0.2s ease;
}

.message-link:hover {
    transform: translateY(-2px);
}

.close-message {
    color: var(--text-secondary);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s ease;
}

.close-message:hover {
    color: var(--primary);
}

.overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .calendar {
        grid-template-columns: repeat(3, 1fr);
    }
    h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .calendar {
        grid-template-columns: repeat(2, 1fr);
    }
    h1 {
        font-size: 2.8rem;
    }
    
    h1 span {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
        padding: 0 20px;
    }
    
    .christmas-text {
        font-size: 1rem;
    }
}

/* Custom Snowflake Style */
.snowflake {
    position: fixed;
    color: rgba(114, 212, 169, 0.3) !important;
    font-size: 1em;
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
    animation: snowfall 15s linear infinite;
    text-shadow: 0 0 10px rgba(114, 212, 169, 0.5);
    -webkit-text-fill-color: rgba(114, 212, 169, 0.3) !important;
    filter: blur(1px);
    will-change: transform;
    transform: translateZ(0);
    display: block;
}

/* Hide snowflakes on mobile */
@media (max-width: 768px) {
    .snowflake {
        display: none;
    }
}

@keyframes snowfall {
    0% {
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .snowflake {
        animation-duration: 15s;
        color: rgba(114, 212, 169, 0.3) !important;
        -webkit-text-fill-color: rgba(114, 212, 169, 0.3) !important;
        text-shadow: 0 0 10px rgba(114, 212, 169, 0.5);
        filter: blur(1px);
    }
}

/* Custom Sparkle Style */
.sparkle {
    background: var(--primary);
}

.logo-link {
    margin-bottom: 2rem;
    display: block;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo {
    width: 100px;
    height: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo {
        width: 80px;
    }
}

.message.christmas {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    25% { transform: translate(-50%, -50%) rotate(-5deg); }
    75% { transform: translate(-50%, -50%) rotate(5deg); }
}

/* Update snowflake animation for Christmas message */
.snowflake.christmas {
    font-size: 24px;
    color: rgba(255, 0, 0, 0.4);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px var(--accent-glow);
    }
    to {
        text-shadow: 0 0 20px var(--accent-glow), 0 0 30px var(--accent-glow);
    }
}

/* Add these styles to your existing CSS */
.footer {
    margin-top: 4rem;
    padding: 4rem 2rem;
    background: var(--surface);
    width: 100%;
    box-sizing: border-box;
    border-top: 2px solid var(--primary);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    margin-bottom: 2.5rem;
}

.footer-section h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-section h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    line-height: 1.4;
}

.footer-cta {
    color: var(--primary) !important;
    font-weight: 500;
    font-size: 1.1rem;
}

.footer-links {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer {
        padding: 3rem 1rem;
    }
    
    .footer-section h2 {
        font-size: 1.8rem;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
}

/* Add these styles for the main CTA */
.main-cta {
    margin: 4rem 0;
    text-align: center;
    width: 100%;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--primary);
    color: var(--background);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
    background: var(--primary-dark);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .cta-button {
        font-size: 1rem;
        padding: 0.8rem 1.5rem;
    }
    
    .main-cta {
        margin: 3rem 0;
    }
}

.additional-info {
    margin: 1.5rem 0;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid rgba(114, 212, 169, 0.2);
    border-bottom: 1px solid rgba(114, 212, 169, 0.2);
}

.info-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.info-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.door-image-container {
    width: 80%;
    height: 55%;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface);
}

.door-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

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

/* Add these snow effect styles */
.door-snow {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation: snowFall 3s linear forwards;
}

@keyframes snowFall {
    0% {
        transform: translateY(-20px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(120px) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

/* Replace the existing door state styles with these improved versions */
.door.past {
    transform-style: preserve-3d;
}

.door.past .door-face {
    border: 2px solid var(--primary);
    box-shadow: 0 0 10px var(--accent-glow);
    opacity: 0.9;
}

.door.today {
    transform-style: preserve-3d;
    position: relative;
}

.door.today .door-face {
    border: 2px solid var(--primary);
    background: linear-gradient(
        rgba(114, 212, 169, 0.1),
        rgba(114, 212, 169, 0.05)
    );
    animation: todayPulse 2s infinite;
}

/* Add festive decorations to today's door */
.door.today .door-face::before {
    content: '🎄';
    position: absolute;
    top: -15px;
    left: 10px;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

.door.today .door-face::after {
    content: '🎁';
    position: absolute;
    top: -15px;
    right: 10px;
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

@keyframes todayPulse {
    0% { 
        border-color: #ff4747;
        box-shadow: 0 0 5px rgba(255, 71, 71, 0.5);
    }
    25% {
        border-color: var(--primary);
        box-shadow: 0 0 15px var(--accent-glow);
    }
    50% { 
        border-color: #ff4747;
        box-shadow: 0 0 20px rgba(255, 71, 71, 0.5);
    }
    75% {
        border-color: var(--primary);
        box-shadow: 0 0 15px var(--accent-glow);
    }
    100% { 
        border-color: #ff4747;
        box-shadow: 0 0 5px rgba(255, 71, 71, 0.5);
    }
}

/* Add these styles for loading state */
.door.loading .door-image-container {
    background: linear-gradient(110deg, #1a1a1a 8%, #272727 18%, #1a1a1a 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    to {
        background-position-x: -200%;
    }
}

.door-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Optimize animation performance */
.snowflake {
    will-change: transform;
    transform: translateZ(0);
}

.door {
    will-change: transform;
    transform: translateZ(0);
}

/* Add these styles for progressive loading */
.door-image-container {
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.blur-load {
    filter: blur(20px);
    transition: filter 0.3s ease;
}

.blur-load.loaded {
    filter: blur(0);
}

.blur-load > picture > img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blur-load.loaded > picture > img {
    opacity: 1;
}

/* Update existing door image styles */
.door-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    will-change: transform;
}

@media (max-width: 768px) {
    .door-image {
        transform: none;
    }
}

/* Update modal styles for better mobile experience */
.message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--surface);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 40px var(--accent-glow);
    z-index: 1000;
    text-align: center;
    max-width: 90%;
    width: 800px;
    border: 3px solid var(--primary);
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Mobile-specific modal adjustments */
@media (max-width: 768px) {
    .message {
        padding: 20px;
        max-height: 80vh; /* Slightly smaller on mobile */
        width: 85%; /* Slightly narrower on mobile */
        margin: 0 auto;
    }

    .message-title {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
        padding-right: 25px; /* Make room for close button */
    }

    .message-description {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .close-message {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 24px;
        padding: 10px;
        color: var(--primary);
        background: var(--surface);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    #video-container {
        margin: 15px 0;
    }

    .message-link {
        display: block;
        margin: 15px auto;
        padding: 12px 20px;
        font-size: 1rem;
    }

    .additional-info {
        margin: 12px 0;
        padding: 8px;
        font-size: 0.9rem;
    }
}

/* Ensure the modal is scrollable but buttons stay visible */
.message-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#video-container {
    flex-shrink: 0;
    position: relative;
    width: 100%;
    margin: 0 auto 5px;
    aspect-ratio: 16/9;
    position: relative;
}

/* Make sure the CTA buttons are always visible */
.message-link, .additional-info {
    flex-shrink: 0;
}

.message-content {
    max-height: 90vh;
    overflow-y: auto;
    padding: 10px;
    position: relative;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

#video-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 5px;
    aspect-ratio: 16/9;
    position: relative;
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.info-text {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
    margin: 5px 0;
}

.info-text:hover {
    color: var(--primary);
}

.message-link {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    background-color: var(--primary);
    color: var(--background);
    font-weight: 500;
    min-width: 200px;
}

.message-link:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Remove old styles */
.action-buttons,
.info-link {
    display: none;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

#video-container a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Optional: Add text truncation for long descriptions */
.message-description {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Show max 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumbnail-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.play-button svg {
    width: 30px;
    height: 30px;
    margin-left: 4px; /* Optical centering */
}

.thumbnail-link:hover .play-button {
    background: var(--primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.thumbnail-link:hover .thumbnail-image {
    transform: scale(1.02);
    filter: brightness(0.8);
} 