:root {
    --primary-dark: #F0F0F0;
    --primary-light: #333;
    --secondary-dark: #9FA2B2;
    --secondary-light: #2E4756;
    --highlight: #3C7A89;
    --card-background: #F0F0F0;
    --grey-background: #F2F2F2F2;
    --dark-grey: #333;
}

body, html {
    background-color: var(--grey-background);
    color: var(--primary-dark);
    margin: 0;
    padding: 40px;
}

/* Set default body text to Rubik Regular */
body {
    font-family: 'Rubik', sans-serif;
    font-weight: 400; /* Regular */
}

/* Keep all headers using Outfit */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Rubik', sans-serif;
}

header {
    background: var(--primary-light);
    padding: 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: padding 0.3s ease-in-out;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

header.scrolled {
    padding-top: 20px;
    padding-bottom: 20px;
}

.logo {
    max-width: 80px; /* Set initial maximum width larger for initial larger logo */
    width: 100%; /* Use width 100% to make it responsive within the max-width limit */
    margin-right: 10px; /* Space between logo and title */
    transition: max-width 0.3s ease-in-out; /* Smooth transition for the max-width property */
}

header.scrolled .logo {
    max-width: 25px; /* Smaller size when scrolled */
}

.header-content a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit; /* Ensures the color stays the same as the parent */
    color: var(--primary-dark);
}

.header-content a:hover {
    text-decoration: none; /* Removes underline on hover */
    opacity: 0.8; /* Optional: adds a slight visual feedback on hover */
}

.logo {
    max-width: 50px;
    margin-right: 10px; /* Space between logo and title */
}

a:link {
    color: var(--dark-grey);
    font-weight: bold;
  }

  .header-content a:link {
    color: var(--primary-dark);
}

  /* mouse over link */
a:hover {
    color: var(--card-background);
    font-weight: bold;
  }

h1 {
    margin: 0;
    font-size: 1.5em;
    transition: font-size 0.3s ease-in-out; /* Transition for resizing text */
}

header.scrolled h1 {
    font-size: 0.75em; /* Smaller font size when scrolled */
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

nav ul li {
    padding: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: bold;
    font-size: 1em; /* Set initial font size for menu text */
    transition: font-size 0.3s ease-in-out; /* Smooth transition for font size */
}

nav ul li a:link {
    color: var(--primary-dark);
}

header.scrolled nav ul li a {
    font-size: 0.75em; /* Smaller font size for menu items when scrolled */
}

* {
    box-sizing: border-box;
}

#song-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 100%;
}

.content, #song-chart {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

.card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: var(--card-background);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    background-color: rgba(255, 255, 255, 0.8); /* Adjust alpha for desired transparency */
    margin: 10px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    color: var(--primary-light);
    border-radius: 10px; /* Ensure rounded corners */
    transition: background-color 0.3s, color 0.3s; /* Transition for color changes */
    transition: backdrop-filter 0.3s ease-in-out;
    overflow: hidden; /* Ensures that children elements like progress-bar do not overflow the card's curved edges */
}

/* Card styles */
.card h2 a {
    font-family: 'Rubik', sans-serif !important;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.card .artist-name {
    font-family: 'Rubik', sans-serif;
    font-weight: 500; /* Semi Bold */
}

.card .relative-time {
    font-family: 'Rubik', sans-serif;
    font-weight: 300; /* Light */
}

/* Time segments and sort filters and dynamic time text */
.time-segment, .sort-filter {
    font-family: 'Rubik', sans-serif;
    font-weight: 400; /* Regular for non-highlighted */
}

.time-segment.highlighted, .sort-filter.highlighted {
    font-weight: 700; /* Bold for highlighted */
}

.card-playing {
    background-color: var(--dark-grey);
    backdrop-filter: blur(10px);
}

.order-number {
    font-size: 20px;
    font-weight: bold;
    color: var(--secondary-dark);
    margin-right: 15px;
}

.album-art-container {
    position: relative;
    width: 100px; /* Match the album art dimensions */
    height: 100px;
    margin-right: 20px;
}

.album-art {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
}

.title-artist {
    flex-grow: 1;
    text-align: left;
    padding-right: 20px; /* Added padding */
}

.title-artist h2 {
    margin: 0;
    font-size: 18px;
    color: var(--primary-light);
}

.title-artist p {
    margin: 0;
    font-size: 14px;
    color: var(--secondary-dark);
}

.title-artist a {
    font-weight: normal; /* Ensures text is not bold */
    color: inherit; /* Maintains the same color as surrounding text */
    text-decoration: none; /* Removes underline from links */
}

.stats {
    text-align: left;
    margin-right: 15px;
    display: flex;
    gap: 10px; 
}

.stats div {
    display: flex;
    align-items: center;
}

.stats .plays, .stats .likes {
    margin: 0;
}

.play-button {
    min-width: 50px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    border: none;
    background: none; /* No background circle */
    color: var(--primary-light); /* Set icon color */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px; /* Larger icon */
    transition: color 0.3s, transform 0.3s; /* Smooth transition for color and transform */
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background-color: var(--card-background);
    transition: width 0.5s linear; /* Smooth transition of the width */
}

.order-number, .title-artist h2, .title-artist p {
    transition: color 0.3s; /* Smooth transition for color change */
}

/* Colors when the card is playing */
.card-playing .stats .fa-play, .card-playing .stats .fa-heart {
    color: var(--primary-dark);
}

.card-playing .stats .plays, .card-playing .stats .likes {
    color: var(--card-background);
}

.card-playing .order-number, 
.card-playing .title-artist p {
    color: var(--primary-dark);
}

.card-playing .title-artist h2 {
    color: var(--card-background);
}

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

.play-button .fa-play, .play-button .fa-pause {
    font-size: 20px;
}

.stats .fa-play, .stats .fa-heart {
    margin-right: 5px; /* Adds space between the icon and the number */
    font-size: 14px; /* Ensuring consistent icon size */
    color: var(--secondary-dark); /* Standardized icon color */
}

/* Footer styles */
footer {
    background-color: var(--grey-background);
    color: var(--secondary-dark);
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    text-decoration: none;
}

.social-media i {
    margin: 0 10px;
    cursor: pointer;
    color: var(--secondary-dark);
    transition: color 0.3s;
    text-decoration: none; 
}

.social-media i:hover {
    color: var(--dark-grey);
    text-decoration: none; 
}

.social-media a {
    text-decoration: none;  /* This will remove underlines from social media links */
}

.footer-image {
    width: 100%;
    max-width: 50px;
    opacity: 0;
    transition: opacity 2s;
    margin-top: 10px;
}

.suno-icon {
    position: absolute;
    bottom: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    opacity: 0.9;
}

/* Ensuring footer image fades into view */
footer:hover .footer-image {
    opacity: 1;
    text-decoration: none;
}

.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px 0;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    color: var(--secondary-dark);
    font-size: 14px;
}

.time-segments, .sorting-options {
    display: flex;
    gap: 10px;
}

.time-segment, .sort-option {
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex-grow: 0;
    flex-shrink: 0;
    min-width: 50px;
    padding-top: 30px;
}

.time-segment {
    padding-right: 15px;
}

.sort-option {
    padding-left: 15px;
}

.time-segment.selected, .sort-option.selected {
    background-color: var(--primary-dark);
    color: var(--primary-light);
    border-radius: 20px;
    font-weight: bold;
}

.sorting-options {
    justify-content: flex-end;
    width: 100%;
}

.dynamic-text {
    font-family: 'Rubik', sans-serif;
    font-weight: 400; /* Regular */
    padding: 0 10px 8px;
    color: #CFD1D9;
    display: flex;
    align-self: flex-start !important;
    text-align: left !important;
    font-size: 14px;
}

.hamburger-menu {
    display: none;
}

/* Specific styles for the About Us page */
.about-us-content {
    padding: 50px 30px;
    color: var(--dark-grey);
}

.about-us-content h2 {
    font-size: 2em;
    color: var(--dark-grey);
}

.about-us-content h3 {
    font-size: 1.5em;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
}

footer .social-media a, footer .social-media a:visited, footer .social-media a:hover, footer .social-media a:active {
    text-decoration: none !important;  /* This ensures the rule has higher specificity and is marked as important */
}

/* Responsive design for big mobile */
@media (max-width: 768px) {

    body {
        padding-top: 20px; /* Adjust for smaller mobile header if different */
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }

    *, *::before, *::after {
        box-sizing: border-box;
    }

     /* Responsive design for cards */
     .container {
        padding: 0; /* Remove padding from the container */
        margin: 0; /* Center the container with no extra margin */
        max-width: 100%; /* Allows the container to expand fully */
      }

      .content, #song-chart {
        padding: 0;
        max-width: 100%; /* Adjusting to allow more width on larger screens */
        margin: 0; /* Centering the content */
    }

      .card {
        display: flex;
        flex-direction: row; /* Changes layout to vertical */
        align-items: center; /* Aligns items vertically in the center */
        justify-content: space-between; /* Aligns items to the start of the container */
        position: relative;
        /*padding: 10px;  Reduced top padding */
        gap: 20px;
        width: 100%;
        max-width: none;
        border-radius: 10px;
    }

    .order-number {
        position: absolute;
        bottom: 20px; /* Position at the bottom left */
        left: 20px; /* Left alignment */
        margin-top: 20px;
        padding-top: 60px;
        font-size: 20px; /* Visible font size */
    }

    .album-art-container {
        flex: 0 0 125px;
        width: 125px;
        height: 125px;
        margin-right: 10px;
        margin-top: 20px;
        margin-bottom: 40px;
        margin-left: 20px;
        align-self: start;
        border-radius: 10px;
        object-fit: cover;
    }

    .album-art {
        width: 100%;
        height: 100%;
        border-radius: 10px;
    }

    .title-artist {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-right: 0px;
    }

    .title-artist h2 {
        font-size: 20px;
    }

    .title-artist p {
        font-size: 15px;
    }

    .stats {
        position: absolute;
        right: 0px; /* Align to the left */
        bottom: 22px; /* Position at the bottom */
        display: flex;
        gap: 10px;
        align-items: center; /* Vertically align contents */
        font-size: 15px; /* Adjust font size for readability */
    }

    .play-button {
        width: 50px; /* Fixed width for the play button */
        height: 50px; /* Fixed height for the play button */
        display: flex; /* Enable flex to center the icon inside the button */
        align-items: center; /* Center the play icon vertically */
        justify-content: center; /* Center the play icon horizontally */
        margin-left: 10px; /* Space from the title/artist */
        font-size: 30px; /* Adjust icon size as needed */
    }

    .stats .fa-play, .stats .fa-heart {
        font-size: 18px; /* Larger icon size for better interaction */
    }

    .relative-time {
        position: absolute;
        bottom: 10px;
        right: 10px;
        font-size: 14px;
    }

    .suno-icon {
        position: absolute;
        bottom: 5px;
        left: 5px;
        width: 15px;
        height: 15px;
        opacity: 1;
    }

    /* Responsive design for filters */
    .filters {
        padding: 10px 10px; /* Reduced padding on smaller screens */
        flex-direction: column; /* Stack filters vertically */
        align-items: center; /* Center-align items for better visual alignment */
        width: 100%; /* Use full width */
        box-sizing: border-box; /* Include padding and border in the width */
    }

    .time-segments, .sorting-options {
        width: 100%; /* Full width to accommodate smaller screens */
        justify-content: space-around; /* Distribute items evenly */
        margin-bottom: 10px; /* Add bottom margin for spacing between segments */
    }

    .time-segment, .sort-option {
        min-width: auto; /* Remove minimum width restrictions */
    }

    .time-segment {
        padding-top: 30px;
        padding-right: 10px;
    }
    
    .sort-option {
        padding-left: 10px;
    }

    .dynamic-text {
        display: inline-flex;
        align-self: center !important;
        text-align: center !important;
    }

    header {
        padding-top: 15px;
        padding-bottom: 15px;
        margin-top: 0;
    }

    .logo, h1, nav ul li a {
        font-size: 0.85em; /* Scale down font sizes for logo, header text, and nav links */
    }

    /* Responsive design for the header */
    .header-content h1 {
        font-size: 18px; /* Adjust size to fit better */
    }

    .logo {
        max-width: 40px; /* Adjust logo size */
    }

    .header-content {
        flex-grow: 1; /* Allow the title to use available space */
    }

    nav ul {
        position: absolute;
        background-color: var(--primary-light);
        width: 100%;
        left: 0;
        top: 60px;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out 0.3s, visibility 0s linear 0.3s;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin-top: 0;
        padding-top: 15px;
        padding-bottom: 15px;
        visibility: hidden;
        opacity: 0;
    }

    nav ul li {
        width: 100%;
        text-align: center;
        transition: opacity 0.5s ease-in-out 0.3s;
    }

    nav ul.visible {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        transition-delay: 0s;
    }

    .hamburger-menu {
        display: block;
        cursor: pointer;
        font-size: 24px;
        color: var(--primary-dark);
    }

    .hamburger-menu i {
        display: block; /* Ensure icon is centered and clickable */
    }

    /* Adjust header in scrolled state */
    header.scrolled {
        padding: 5px 20px;
    }

    header.scrolled .logo {
        max-width: 20px; /* Smaller size for mobile when scrolled */
    }

    header.scrolled h1 {
        font-size: 0.75em; /* Maintain smaller size on mobile when scrolled */
    }

    header.scrolled nav ul li a {
        font-size: 0.5em; /* Maintain smaller size on mobile when scrolled */
    }
}

/* Responsive design for small mobile */
@media (max-width: 450px) {
    .card {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .album-art-container {
        width: 200px;
        height: 200px;
        margin: 5px auto;
        border-radius: 10px;
        position: relative;
    }

    .play-button {
        display: none;
    }

    .title-artist-container {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
    }

    .title-artist {
        text-align: center;
        flex-grow: 1;
        margin: 0;
        padding-bottom: 50px;
    }

    .time-segment {
        padding-top: 30px;
        padding-right: 10px;
    }
    
    .sort-option {
        padding-top: 0;
        padding-left: 10px;
    }
    .stats {
        bottom: 22px;
    }
}