 /* --- MODERN VARIABLES --- */
:root {
    --primary: #d4a373; /* Earthy Gold */
    --bg: #fefae0;      /* Cream */
    --dark: #2f3e46;    /* Dark Charcoal */
    --accent: #bc6c25;  /* Deep Orange/Brown */
    --glass: rgba(255, 255, 255, 0.8);
}

/* --- RESET & BASE STYLES --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, figcaption {
    font-family: 'Dancing Script', cursive;
}

/* --- UTILITIES --- */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- HERO SECTION --- */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    
    /* Using a high-quality internet image for background */
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1518199266791-5375a83190b7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    
    background-size: cover;
    background-position: center;
    color: white;
    padding: 20px;
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

header p {
    font-size: 1.2rem;
    font-weight: 300;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    animation: bounce 2s infinite;
    font-size: 1.5rem;
}

/* --- COUNTER SECTION --- */
.counter-section {
    padding: 60px 20px;
    text-align: center;
    background: white;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.time-box {
    background: var(--bg);
    padding: 15px;
    border-radius: 10px;
    min-width: 80px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.time-box span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

/* --- TIMELINE SECTION --- */
.timeline {
    position: relative;
    padding: 60px 20px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.memory {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
}

.memory::after {
    content: '❤️';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -13px;
    background-color: white;
    border: 2px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.left { left: 0; }
.right { left: 50%; }
.left::before { content: " "; height: 0; position: absolute; top: 22px; width: 0; z-index: 1; right: 30px; border: medium solid white; border-width: 10px 0 10px 10px; border-color: transparent transparent transparent white; }
.right::before { content: " "; height: 0; position: absolute; top: 22px; width: 0; z-index: 1; left: 30px; border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }
.right::after { left: -12px; }

.content {
    padding: 20px;
    background-color: white;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- POLAROID GALLERY STYLES --- */
.gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 20px 20px 60px 20px;
}

.photo-frame {
    background-color: white;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transform: rotate(0deg);
    transition: all 0.4s ease;
    max-width: 300px;
    width: 100%;
    position: relative;
    cursor: pointer;
}

.photo-frame img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.photo-frame figcaption {
    position: absolute;
    bottom: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    color: var(--dark);
}

.tilt-left { transform: rotate(-3deg); }
.tilt-right { transform: rotate(3deg); }

.photo-frame:hover {
    transform: rotate(0deg) scale(1.05) translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    z-index: 10;
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

/* --- LOGIN OVERLAY STYLES --- */
#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 62, 70, 0.98);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-box h2 { color: var(--accent); margin-bottom: 10px; }
.login-box input {
    width: 100%; padding: 12px; margin: 15px 0;
    border: 2px solid #ddd; border-radius: 8px;
    font-size: 1rem; outline: none; transition: border-color 0.3s;
}
.login-box input:focus { border-color: var(--primary); }
.login-box button {
    background: var(--dark); color: white; border: none;
    padding: 12px 25px; border-radius: 30px; font-size: 1rem;
    cursor: pointer; transition: transform 0.2s, background 0.2s;
}
.login-box button:hover { transform: scale(1.05); background: var(--accent); }
#error-message { color: #e63946; margin-top: 15px; font-weight: 600; min-height: 20px; }

/* ANIMATIONS */
@keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }
.shake { animation: shake 0.5s; }
@keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-10px); } 50% { transform: translateX(10px); } 75% { transform: translateX(-10px); } 100% { transform: translateX(0); } }

/* MOBILE ADJUSTMENTS */
@media screen and (max-width: 600px) {
    .timeline::after { left: 31px; }
    .memory { width: 100%; padding-left: 70px; padding-right: 25px; }
    .memory::before { left: 60px; border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }
    .left::after, .right::after { left: 18px; }
    .left, .right { left: 0; }
    header h1 { font-size: 2.5rem; }
}

