/* Font imports */
@font-face {
    font-family: 'Geist';
    src: url('geist.ttf') format('truetype');
    font-style: normal;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('geistmono.ttf') format('truetype');
    font-style: normal;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap');

/* Theme variables */
:root[data-theme="light"] {
    --background-color: #ffffff;
    --text-color: #333333;
    --nav-background: #f5f5f5;
    --section-background: #ffffff;
}

:root[data-theme="dark"] {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --nav-background: #2d2d2d;
    --section-background: #2d2d2d;
}

/* Base styles */
body {
    font-family: 'Geist', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

header, main, footer {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Header styles */
:root[data-theme="light"] header {
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    color: #333333;
    position: relative;
    overflow: hidden;
    animation: gradientAnimationLight 30s infinite alternate;
}

:root[data-theme="dark"] header {
    background: linear-gradient(135deg, #1a1a1a, #3a3a3a);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    animation: gradientAnimationDark 30s infinite alternate;
}

/* Typography */
h1 {
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 600;
}

h2 {
    font-weight: 500;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

nav li {
    margin: 0 10px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    background-color: var(--nav-background);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #bababa;
}

/* Section styles */
section {
    background-color: var(--section-background);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Footer styles */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
}

/* Links */
a {
    color: var(--text-color);
}

#footer-text {
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
}

/* Layout */
.content-container {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;
    width: 100%;
    max-width: 100%;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;

}

#album-art {
    max-width: 100%;
    height: auto;
    display: block;
}

#theme-toggle {
    cursor: pointer;
    width: 24px;
    height: 24px;
}

section img {
    max-width: 100%;
    height: auto;
    
}

/* Navigation toggle */
#nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 100;
    padding-bottom: 15px;
}

#nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* Responsive layouts */
@media (min-width: 600px) {
    main {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 2fr));
    }
}

@media (min-width: 1024px) {
    main {
        grid-template-columns: repeat(3, minmax(0, 2fr));
    }
}

@media (max-width: 768px) {
    #nav-toggle {
        display: block;
    }

    .nav-content {
        display: none;
        width: 100%;
    }

    .nav-content.active {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    nav li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    nav {
        flex-direction: column;
    }

    section:first-of-type img {
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    section:first-of-type img {
        max-width: 60%;
    }
}

/* Animations */
@keyframes gradientAnimationLight {
    0% {
        background-position: 0% 50%;
        background-image: linear-gradient(135deg, #ffffff, #e0e0e0);
    }
    50% {
        background-position: 100% 50%;
        background-image: linear-gradient(135deg, #e0e0e0, #f0f0f0); 
    }
    100% {
        background-position: 0% 50%;
        background-image: linear-gradient(135deg, #f0f0f0, #ffffff);
    }
}

@keyframes gradientAnimationDark {
    0% {
        background-position: 0% 50%;
        background-image: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    }
    50% {
        background-position: 100% 50%;
        background-image: linear-gradient(135deg, #2d2d2d, #3a3a3a);
    }
    100% {
        background-position: 0% 50%;
        background-image: linear-gradient(135deg, #3a3a3a, #1a1a1a);
    }
}



/* Song of the Day component */
#daily-song {
    padding: 20px 15%;
    margin: 0;
}

#song-card {
    background: rgba(0, 0, 0, 0.05);
    padding: 20px;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1.2fr 2fr 1.2fr;  /* Three columns: titles, info, and album art */
    gap: 20px;
    align-items: center;
    max-width: 1200px;  /* Increased to accommodate album art */
    margin: 0 auto;
}

/* Left side with titles */
.song-titles {
    text-align: left;
}

#daily-song h2 {
    font-size: 1.8em;
    margin: 0;
    padding: 0;
}

#daily-song h4 {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

/* Right side with song info */
.song-info {
    text-align: left;
    padding-left: 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

#song-card h3 {
    margin: 0;
    font-size: 1.4em;
    overflow-wrap: break-word;
}

#song-artist {
    font-style: italic;
    margin: 8px 0;
    font-size: 1.1em;
}

#song-description {
    font-size: 1.4em;
    margin: 12px 0;
}

#spotify-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1DB954;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

#spotify-link:hover {
    background: #1ed760;
}

#spotify-icon {
    height: 20px;
    width: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #daily-song {
        padding: 20px 10%;
    }
    
    #song-card {
        grid-template-columns: 1fr;  /* Stack vertically on mobile */
        gap: 15px;
    }
    
    #album-art-container {
        order: 2;  /* Show album art between titles and info on mobile */
    }
    
    #album-art {
        width: 200px;  /* Larger on mobile */
        height: 200px;
    }
    
    .song-info {
        order: 3;
        padding-left: 0;  /* Remove left padding */
        border-left: none;  /* Remove the divider */
        text-align: center;  /* Center text on mobile */
    }
    
    .song-titles {
        text-align: center;  /* Center titles on mobile */
    }
}

/* Update main content spacing */
main {
    margin-top: 20px;
}

/* Album art styles */
#album-art-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

#album-art {
    width: 150px;  /* Fixed width */
    height: 150px;  /* Fixed height */
    border-radius: 4px;  /* Slightly rounded corners */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);  /* Subtle shadow */
    object-fit: cover;  /* Maintain aspect ratio */
}
