/* --- Global Styles & Varwables (Pastel Light Theme) --- */
:root {
    /* Your Palette as Accents */
    --c-pink: #d599be;
    --c-green: #90cba5;
    --c-lilac: #f3c7f7;
    --c-cyan: #89ebee;
    --c-yellow: #e0d79d;
    --c-peach: #ffbebc;
    --c-tan: #d2a188;
    --c-skyblue: #b8dfff;
    --c-bluegrey: #95aec5;
    --c-mint: #e3fffa;

    /* Base Theme */
    --bg-primary: #000000; /* Soft off-white background */
    --bg-secondary: #ffffff; /* Pure white for cards */
    --text-dark: #2c3e50; /* Dark blue-grey for text */
    --text-secondary: #7f8c8d; /* Lighter grey for subtext */
    --border-color: #ecf0f1; /* Soft grey for borders */
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --border-radius-smooth: 12px; /* Softer, rounder corners */
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.07);
}

body {
    font-family: var(--font-sans);
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-attachment: fixed;
}

h1, h2, h3 {
    font-family: var(--font-sans);
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--c-pink);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--c-green);
}

/* --- Layout & Containers --- */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

section {
    padding: 3rem 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-smooth);
    box-shadow: var(--shadow-soft);
}

/* --- Header & Navigation --- */
header {
    background-color: var(--bg-primary); 
    padding: 1.5rem 2rem; /* Use padding from main for alignment */
    position: relative; /* Changed from sticky */
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center items vertically */
    max-width: 1200px;
    margin: 0 auto;
}

.header-left-group {
    display: flex;
    flex-direction: column; /* Stack vvv and To Do List */
    align-items: flex-start;
}

.header-left-group .logo {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--c-pink);
    padding: 0;
}

.header-left-group ul {
    list-style: none;
    margin: 0;
    padding: 0; /* Remove default padding */
}

.header-left-group ul li a {
    color: var(--text-dark);
    font-weight: 700;
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.header-left-group ul li a:hover {
    color: var(--c-pink);
}


.spotify-embed {
    /* Set a max-width and min-width for the embed */
    min-width: 300px;
    max-width: 400px;
    width: 30%; /* Adjust width as needed */
    height: 80px; /* Force the 80px compact height */
    overflow: hidden; /* Hide anything that tries to overflow */
}

.spotify-embed iframe {
    height: 80px !important; /* Force the 80px height */
    width: 100%;
}


/* --- Hero Section --- */
.hero {
    /* Remove all section styling from hero */
    background: none; 
    border: none;
    box-shadow: none;
    padding: 2rem 1rem;
}

.hero-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    min-height: 400px; 
}

.hero-text {
    flex: 2; /* Takes up 2/3 of the space */
    text-align: left; /* Align text to the left */
}

.hero-images {
    flex: 0 0 25%; /* Give it a fixed base width (adjust 25% as needed) */
    max-width: 25%; /* Match the flex-basis */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3; /* Gives a standard box shape */
    background-color: var(--border-color);
    border-radius: var(--border-radius-smooth);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    border: 2px dashed var(--c-bluegrey);
    box-sizing: border-box; /* Ensures padding/border are inside */
    overflow: hidden; /* Add this to clip the image */
}

.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Scales the image to cover the box */
}


.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-secondary); /* Lighter grey for subtitle */
    margin-top: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 400;
}

/* --- Universal Button Style --- */
.button-link, #login-button, #signup-button, #unlock-button {
    display: inline-block;
    background: var(--c-pink);
    color: #ffffff; /* White text on button */
    padding: 14px 28px;
    border: none;
    border-radius: 50px; /* Pill-shaped = smooth */
    text-decoration: none;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-family: var(--font-sans);
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(213, 153, 190, 0.4); /* Shadow from the button color */
}

.button-link:hover, #login-button:hover, #signup-button:hover, #unlock-button:hover {
    transform: scale(1.05); /* Pop out on hover */
    background: var(--c-green); /* Change to green on hover */
    box-shadow: 0 6px 20px rgba(144, 203, 165, 0.4);
}

/* --- TO-DO APP STYLES --- */
#todo-app-container {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-smooth);
    box-shadow: var(--shadow-soft);
    padding: 2rem 2.5rem;
}

#todo-app-container h2 {
    color: var(--text-dark);
    text-align: center;
    margin-top: 0;
}

/* Auth Form Styles */
#auth-container {
    text-align: center;
    padding: 2rem 0;
}
#auth-container h3 {
    color: var(--text-dark);
    font-weight: 700;
}
#auth-container input[type="password"] {
    display: block;
    margin: 1rem auto;
    padding: 14px;
    width: 80%;
    max-width: 350px;
    border: 1px solid var(--border-color);
    border-radius: 10px; /* Smooth corners */
    background-color: #f4f4f4; /* Light grey input */
    color: var(--text-dark);
    font-family: var(--font-mono);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#auth-container input[type="password"]:focus {
    outline: none;
    border-color: var(--c-pink);
    box-shadow: 0 0 10px rgba(213, 153, 190, 0.3);
}

#auth-error {
    color: #e74c3c; /* Standard red */
    font-size: 0.9rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
}

/* To-Do List Area */
#todo-container {
    text-align: center;
}

#todo-container .user-info {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    /* Flexbox to align buttons */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
    gap: 10px;
}

#logout-button {
    background: var(--text-secondary); /* Grey for secondary action */
    padding: 8px 15px;
    font-size: 0.8rem;
    /* margin-left: 1rem; */ /* Replaced by gap */
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0; /* Remove margin from universal button style */
}
#logout-button:hover {
    background: var(--text-dark);
}

/* NEW Clear All Button Style */
#clear-all-button {
    background-color: var(--c-peach);
    color: var(--text-dark);
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.2s, transform 0.2s;
    margin-top: 0; /* Remove margin from universal button style */
}
#clear-all-button:hover {
    background-color: var(--c-pink);
    color: white;
    transform: scale(1.05);
}


#add-todo-form {
    display: flex;
    gap: 10px;
    margin: 2rem 0;
}

#add-todo-form input[type="text"] {
    flex: 1;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background-color: #f4f4f4;
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 1rem;
}
#add-todo-form input[type="text"]:focus {
    outline: none;
    border-color: var(--c-pink);
}

#add-todo-form button {
    background: var(--c-green);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
#add-todo-form button:hover {
    background: #7dc096;
}

#todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.todo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg-primary); /* Off-white for note */
    border-radius: 10px;
    margin-bottom: 10px;
    word-break: break-all;
}

.todo-item span {
    flex: 1;
    padding-right: 15px;
}

.remove-todo-btn {
    background-color: var(--c-peach);
    color: var(--text-dark);
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.2s, transform 0.2s;
}
.remove-todo-btn:hover {
    background-color: var(--c-pink);
    color: white;
    transform: scale(1.05);
}

.empty-list {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* --- Responsive Design (Basic) --- */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    .header-left-group {
        align-items: center; /* Center logo/link on mobile */
    }
    .spotify-embed {
        width: 90%;
        min-width: 0;
    }

    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
    section {
        padding: 2rem 1.5rem;
    }

    /* Make hero stack on mobile */
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        text-align: center;
        order: 2; /* Put text below images on mobile */
    }
    .hero-images {
        order: 1; /* Put images on top */
        width: 80%; /* Don't let them be full width */
        flex: none; /* Remove flex sizing */
        max-width: none; /* Reset max-width */
    }

    #add-todo-form {
        flex-direction: column;
    }

    #auth-container input {
        width: 90%;
    }
}

/* 1. The class for the animated text effect */
.rainbow-text {
    /* You can adjust font size and weight as needed */
    font-size: 2rem;
    font-weight: 900;
    
    /* Creates the pink and white gradient */
    background-image: linear-gradient(
        to right, 
        #FF69B4,
        #FF69B4, /* Hot Pink */
        #ffb6c1,
        #ffb6c1, /* White */
        #FF69B4  /* Hot Pink again for the loop */
    );
    background-size: 200% auto;

    /* Clips the background to the text */
    -webkit-background-clip: text;
    background-clip: text;

    /* Makes the text color transparent so the background shows through */
    color: transparent;

    /* Applies the animation */
    animation: rainbow-flow 8s linear infinite;
}

/* 2. The animation that moves the gradient */
@keyframes rainbow-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 3. (Optional) Media query to make the text smaller on mobile */
@media (max-width: 600px) {
    .rainbow-text {
        font-size: 2.5rem;
    }
}
