:root {
    --black-color: #020313;
    --green-color: #1ED760;
    --orange-color: #FF3D31;
}

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

html, body {
    width: 100%;
    height: 100%; /* Change from 100vh to 100%. This allows body to expand with content. */
    overflow-x: hidden; /* Keep horizontal overflow hidden */
}

body {
    min-height: 100vh; /* Ensure it covers full viewport initially */
    overflow-y: auto;
    margin: 0;
    font-family: 'Inter', 'Lato', 'Raleway', sans-serif;
    background: linear-gradient(247.13deg, rgba(0, 0, 0, 0) 0%, rgba(255, 61, 49, 0.2) 80%), linear-gradient(167.85deg, rgba(0, 0, 0, 0) 0%, rgba(30, 215, 96, 0.2) 80%), #020313;
}

.wrapper {
    width: 100%;
    margin: 0 auto;
}

/* Button */

.btn {
    padding: 12px 24px;
    border-radius: 24px;
    color: white;
    display: inline-block;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.btn.dark {
    background: rgb(0, 0, 0);
    border-radius: 16px;
    padding: 8px 20px;
}

.btn.light {
    background: white;
    color: black;
}

/* Header Section */

header {
    height: 98px;
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: auto;
    width: 90%;
    position: relative; /* Ensure proper layout positioning */
}

/* Styling for the logo */
nav .logo {
    position: relative;
    margin-bottom: 30px;
}

nav .logo img { 
    height: 70px; /* Adjust the height as needed */ 
    width: auto; /* Maintain aspect ratio */
    vertical-align: middle;
}

nav ul { 
    display: flex; 
    align-items: center; /* Align items vertically in the center */ 
    list-style: none; 
    margin: 0; /* Reset margin to prevent shifting */ 
}

ul li {
    margin: 20px;
}

nav ul li a {
    font-family: "Poppins", sans-serif;
    font-weight: normal;
    font-size: 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Hover effect for the links */
nav ul li a:hover {
    color: wheat; /* Change color on hover */
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80vh;
    width: 100%;
    padding-top: 50px; /* Ensure content isn't hidden behind nav */
}

.hero-section .center {
    max-width: 800px;
    padding: 20px;
    text-align: center;
}

.hero-section .center h1 {
    font-size: 2.5em;
    font-family: "Raleway", sans-serif;
    color: white;
    margin-bottom: 15px;
}

.hero-section .center p {
    font-size: 1.2em;
    line-height: 1.5;
    margin-bottom: 20px;
    color: white;
}

.hero-section .center .btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1em;
    color: black;
    background-color: white;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    margin-bottom: 20px;
}

.hero-section .photo {
    display: flex;
    justify-content: center;
    gap: 70px;
    margin-top: 30px;
}

.hero-section .photo img {
    width: 50px;
    height: 50px;
}

/* second-part */

.wrapper .second-part{
    display: flex;
    font-family: "Raleway", sans-serif;
    justify-content: space-evenly;
    font-size: 0.9em;
    align-items: center;
    text-align: left;
    margin: 250px auto 150px auto;
}
.wrapper .second-part > div{
    width: 300px;
    height: 480px;
    border: 1px solid #6A6868;
    border-radius: 30px;
    padding: 30px;
    background: rgba(217, 217, 217, 0.05);
    backdrop-filter: blur(45.075px);
    color: #fff;
}

.wrapper .second-part > div .image,
.wrapper .last-part > div .image{
    height: 111.69px;
}

.wrapper .second-part .left .unlimited-music .image{
    display: flex;
    justify-content: center;
    height: 111.69px;
}

.wrapper .second-part .left .unlimited-music .content {
    margin-top: 50px;
}

.wrapper .second-part .middle .share-platform .image {
    display: flex;
    height: 150px;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Ensures the content doesn't overflow the container */
}

.wrapper .second-part .middle .share-platform .image img {
    max-width: 100%; /* Makes sure the image doesn't exceed the container width */
    max-height: 100%; /* Makes sure the image doesn't exceed the container height */
    object-fit: cover; /* Adjusts the image to cover the entire container */
}


.wrapper .second-part .right .playlist-between .image{
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    margin: auto;
    height: 71.69px;
}
.wrapper .second-part .right .playlist-between .image img{
    height: 50px;
    width: 50px;
    margin: 5px;
    margin-top: 50px;
}

.wrapper .second-part .right .content {
    font-family: "Raleway", sans-serif;
    display: flex;
    align-items: center;
    width: 250px;
    font-size: 1em;
    margin-top: 150px;
}

.transfer-section .wrapper{
    position: relative;
    margin: 175px auto 100px auto;
}

.transfer-section .wrapper .image{
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transfer-section .wrapper .content{
    position: absolute;
    width: 350px;
    height: 200px;
    top: 50%;   
    left: 50%;  
    transform: translate(-50%, -50%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-family: 'Raleway' sans-serif;
    font-style: normal;
    font-weight: 500;
    font-size: 17px;
    line-height: 23px;
    align-self: stretch;

}


.wrapper .last-part{
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    text-align: left;
    font-size: 0.9em;
    margin: 40px auto;
}

.wrapper > h2{
    color: #fff;
    font-family: 'Lato';
    font-weight: 700;
    font-size: 40px;
    line-height: 58px;
    text-align: center;
    margin: 90px auto 100px auto;

}

.wrapper .last-part > div{
    width: 300px;
    height: 430px;
    background: rgba(217, 217, 217, 0.05);
    border: 1px solid #6A6868;
    backdrop-filter: blur(45.075px);
    border-radius: 30px;
    color: #fff;
    padding: 30px;
       
}

.wrapper .last-part .image{
    display: flex;
    height: 200px;
    width: 200px;
    align-items: center;
    justify-content: center;
}

/*index page css */

.transfer-section .center{
    width: 100%;
    height: 100%;
    margin: auto;
}

.transfer-section .center > h1{
    font-size: 2.5em;
    font-family: "Raleway", sans-serif;
    color: white;
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 32px;
    line-height: 58px;
    text-align: center;
}

.wrapper .second-part .middle {
    display: flex;
    justify-content: center;
}

.transfer-section-platform .second-part-platform{
    margin: 80px auto;
}

.transfer-section-platform h1{
    width: 50%;
    text-align: center;
    margin: auto;
    color: #fff;
    margin-bottom: 20px;
}

.wrapper .second-part-platform .middle .share-playlist {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px; /* Add space between the icons */
    width: 90%; /* Adjust width as needed to center the content */
    margin: 0 auto; /* Center the share-platform within the container */
}


.wrapper .second-part-platform .middle .share-playlist .platform-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.wrapper .second-part-platform .middle .share-playlist .platform-container img {
    height: 180px;
    width: auto;
    margin-bottom: 40px;
    transition: transform 0.3s;
}

.wrapper .second-part-platform .middle .share-playlist .platform-container .coda {
    height: 150px;
    width: 150px;
    transition: transform 0.3s;
}

.wrapper .second-part-platform .middle .share-playlist .platform-container .animated-button {
    display: none;
    padding: 10px 8px;
    justify-content: center;
    gap: 10px;
    width: 280px;
    height: auto;
    text-align: center;
    border: 1px solid #6A6868;
    border-radius: 10px;
    color:#000;
    background-color: #fff;
    font-family: 'Raleway' sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
}

.wrapper .second-part-platform .middle .share-playlist .platform-container.middle {
    transform: scale(1.2);
    z-index: 1;
}

.wrapper .second-part-platform .middle .share-playlist .platform-container.middle img {
    transform: scale(1.2);
}

.wrapper .second-part-platform .middle .share-playlist .platform-container.middle .animated-button {
    display: flex;
}

.wrapper .second-part-platform .middle .share-playlist .platform-container.side {
    opacity: 0.5;
}

/*coming soon */

.coming {
    max-width: 800px;
    padding: 20px;
    color: white;
    margin-bottom: 250px;
}

.playlist-name {
    color: white;
    margin-top: 20px; /* Margin from the heading */
}

/* Main content wrapper on history page */
.content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05); /* Semi-transparent background for content box */
    border-radius: 10px;
    overflow: hidden; /* Prevent content from breaking out */
    position: relative;
    color: white; /* Ensure text is visible */
}

/* Container for centering the form */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    color: white;
    margin-top: -50px;
    padding: 20%; /* Add some padding for spacing */
    box-sizing: border-box;
}

.container .playlist-form-box > h1{
    font-family: "Raleway" sans-serif;
    display: flex;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 30px;
}

.wrapper .playlist-page {
    background: url('/static/images/Group_9.png');
    background-attachment: scroll;
    background-repeat: no-repeat;
    background-position: center; /* Centers the background image */
    font-family: Arial, sans-serif;
    background-size: 65%;
    min-height: calc(100vh - 98px);
    width: 100%;
}


/* Box to contain the form and elements */
.playlist-form-box {
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    padding: 15px;
    border-radius: 10px;
    max-width: 550px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Connect to Spotify button */
.btn.connect-spotify {
    display: block;
    width: 40%;
    background-color: rgb(42, 160, 42);
    color: white;
    padding: 15px;
    border-radius: 24px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    margin-top: 2px;
    padding: 3px 3px;
}

/* Form group styling */
.form-group {
    margin-bottom: 20px;
}

.group {
    margin-bottom: 20px;
}

.group > select {
    width: 100%;
    height: 35px;
}

.form-group > input{
    height: 35px;
}

.form-group > textarea{
    height: 50px;
}

/* Button container styling */
.button-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 20px;
    color: #000;
}

/* General button styling */
.button-container .btn {
    padding: 7px 7px;
    border-radius: 24px;
    width: 48%;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    color: #000;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.btn.apple-button{
    background-color: white;
}

.btn.btn-secondary{
    background-color: rgb(206, 171, 177);
    color: black;
    padding: 5px 5px;
    font-size: 14px;
    margin: 2px;
}

/* Ensure form fields are styled appropriately */
input.form-control, textarea.form-control {
    width: 100%;
    padding: 15px;
    border-radius: 3px;
    border: #fff;
    margin-top: 5px;
}

.table-container {
    font-size: 15px;
    background-color: rgba(0, 0, 0, 0.7); /* Darker background for table containers */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px; /* Space between different history tables */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.table-container > h3{
    font-size: 1.15em;
    font-weight: bold;
    font-family: "Raleway" sans-serif;
    color: #fff; /* Ensure heading color */
    margin-top: 0;
    margin-bottom: 10px;
}

.table-container > h4{
    font-size: 0.9em;
    font-weight: normal;
    font-family: "Inter" sans-serif;
    margin: 10px 0;
    color: rgba(255,255,255,0.8);
}

.table-container > h4 > a {
    color: rgb(194, 100, 132);
    text-decoration: none;
}

.table-container > p{
    font-size: 0.8em;
    font-weight: normal;
    font-family: "Inter" sans-serif;
    margin: 5px;
}

.table-container h4 a:hover {
    text-decoration: underline;
}

/* THE NEW SCROLLABLE TABLE BODY */
.scrollable-table-body {
    max-height: 250px; /* ADJUST THIS VALUE: This controls the visible height of the table body. */
                       /* 250px will show ~3-4 rows depending on padding. Adjust as needed. */
    overflow-y: auto; /* Enable vertical scrolling */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border around scrollable area */
    border-radius: 5px; /* Match container border-radius */
    padding-right: 10px; /* Space for the scrollbar */
    margin-bottom: 10px; /* Space below the scrollable area */
}

.table-container > p > button {
    font-size: 1em;
    font-weight: bold;
    color: #8d6d6b;
    background: black;
    border: 0.1px solid #ddd;
    margin: 5px;
    width: 80px;
    height: 20px;
}

.history {
    width: 100%;
    font-family: "Raleway", sans-serif;
    text-decoration: none;
    position: relative;
    bottom: 10px;
}

button {
    background-color: white;
    color: black;
    padding: 0.5px 3px;
    margin-left: 10px;
    border: none;
    cursor: pointer;
    font-family: "Inter", sans-serif;
}

.table {
    width: 100%;
    border-collapse: collapse; /* Remove space between cells */
    margin-top: 0;
}

.table thead th {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly darker header background */
    font-weight: bold;
    text-align: left;
    padding: 12px;
    color: #fff;
    position: sticky; /* Make table headers sticky */
    top: 0; /* Stick to the top of the scrollable container */
    z-index: 2; /* Ensure headers are above scrolling content */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.table thead th:nth-child(1), /* Source */
.table tbody td:nth-child(1) {
    width: 15%; /* Adjust percentage as needed */
}

.table thead th:nth-child(2), /* Destination Name */
.table tbody td:nth-child(2) {
    width: 45%; /* Give more space for names */
}

.table thead th:nth-child(3), /* Transferred On */
.table tbody td:nth-child(3) {
    width: 25%; /* For date/time */
    white-space: nowrap; /* Prevent date from wrapping */
}

.table thead th:nth-child(4), /* Action */
.table tbody td:nth-child(4) {
    width: 15%; /* For the delete button */
    text-align: center; /* Center the delete button column header */
}

.table tbody td:nth-child(4) {
    text-align: center; /* Center the delete button in its cell */
}

/* Delete Button Styling (within table) */
.table .btn-danger {
    background-color: #dc3545; /* Bootstrap red */
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.table .btn-danger:hover {
    background-color: #c82333;
}

/* Link in table cell */
.table td a {
    color: #1ED760; /* Spotify green or a distinct link color */
    text-decoration: none;
}

.table td a:hover {
    text-decoration: underline;
}

/* "Go to Home" button */
.text-center.mt-4 {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 20px;
}

.text-center.mt-4 .btn-primary {
    background-color: #540f0f; /* Primary blue */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.text-center.mt-4 .btn-primary:hover {
    background-color: #1f1414;
}

/* Override .history underline if it's causing issues */
.history { /* if this class is used on the h1 */
    text-decoration: none; /* remove default underline */
}

/* History page specific header */
.history-header {
    color: white;
    text-align: center;
    margin-bottom: 30px; /* Space below the heading */
    font-size: 2em;
    font-family: "Raleway", sans-serif;
    position: relative; /* Essential for positioning the ::after pseudo-element */
    padding-bottom: 15px; /* Add padding to make space for the line below the text */
}

.history-header::after {
    content: ''; /* Required for pseudo-elements */
    display: block; /* Makes the pseudo-element a block-level element */
    width: 60%; /* Adjust the width of the line (e.g., 50%, 80%) */
    height: 2px; /* Adjust the thickness of the line */
    background-color: white; /* Color of the line */
    position: absolute; /* Position relative to the .history-header */
    bottom: 0; /* Position at the bottom of the padding-bottom */
    left: 50%; /* Start at 50% from the left */
    transform: translateX(-50%); /* Center the line horizontally */
}

.section-separator {
    display: block; /* Make it a block-level element */
    width: 60%; /* Adjust the width of the line */
    height: 1px; /* Adjust the thickness of the line (1px or 2px usually looks good) */
    background-color: rgba(255, 255, 255, 0.3); /* A subtle white/gray line */
    margin: 40px auto; /* Add margin above and below, and center it horizontally */
}

.row {
    display: flex;
    justify-content: center;
    text-align: center;
}

.row-header {
    display: flex;
    justify-content: center;
    text-align: center;
    font-weight: bold;
}

.cell {
    flex: 1;
    padding: 3px;
    border: 1px solid #ddd;
    color: rgb(46, 189, 189);
}

/* Styling for the blinking link */
.connect {
    color: rgb(70, 152, 70);
    margin-top: 10px;
    text-decoration: none;
    display: inline-block;
    overflow: hidden; /* Ensure it doesn't move out of the box */
    position: relative;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Stop blinking on hover */ 
.connect:hover { 
    animation: none; 
}

.wrapper .logo > a{
    color: #fff;
    text-decoration: none;
    position: fixed;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 1000;
    font-family: Inter, sans-serif;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    background: #dc3545;
}

/* Button styling */
.btn-history {
    display: inline-block;
    padding: 8px 30px;
    background-color: black;
    color: white;
    border: 1px solid white;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    
    /* Position the button in the top-right corner */
    position: fixed;      /* Fixed position */
    top: 20px;            /* Distance from the top */
    right: 20px;          /* Distance from the right */
    z-index: 1000;        /* Ensure the button appears on top of other elements */
}

/* Initially faded */
#continue-button.faded {
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

/* Fully visible when enabled */
#continue-button.enabled {
    opacity: 1;
}

/* .btn-history {
    position: absolute;
} */

/* Hover effect */
.btn-history:hover {
    background-color: white;
    color: black;
    border-color: black;
}

/* Transfer Section */
.transfer-section {
    padding: 20px;
    text-align: center;
}

/* Adjust Header */
.playlist-header {
    margin-top: 0px; /* Align header closer to the top */
    margin-bottom: 30px; /* Add gap between header and playlists */
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Playlist Container */
.playlist-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 2fr));
    gap: 20px; /* Space between cards */
    margin: 20px auto;
    padding: 0 20px;
    color: white;
    max-width: 1200px; /* Limit the container width */
}

/* Playlist Card */
.playlist-card {
    background-size: cover; /* Image covers the entire card */
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    height: 120px; /* Adjust card height */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.playlist-card a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Hover Effects */
.playlist-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
}

.playlistCard {
    margin: -5px;
    padding: auto;
}

/* Playlist Content */
.playlist-content {
    padding: 10px;
    text-align: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .playlist-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    .playlist-header {
        font-size: 1.5rem; /* Smaller font on mobile */
    }
}

#transfer-overlay {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Overall section styling */
.about-section {
    width: 100%;
    padding-top: 0px; /* Ensure content isn't hidden behind nav */
    margin: 20px; /* Margin from border */
}

/* Center styling */
.about-section .center {
    width: 100%;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    font-family: "Raleway", serif;
    text-align: center;
    color: #fff;
    position: relative; /* Ensure proper positioning */
    margin-bottom: 100px; /* Margin below the heading About Us */
    margin-top: 20px; /* Margin above the heading About Us */
}

/* Underline styling for the center */
.about-section .center::after {
    content: '';
    display: block;
    width: 60%;
    height: 2px; /* Adjust the height of the underline */
    background-color: white; /* Adjust the color of the underline */
    margin: -10px auto 0; /* Center the underline and add some margin for spacing */
}

/* Heading styling */
.about-headings {
    color: #fff;
    font-family: "Bebas Neue", serif;
    margin: 100px;
    font-weight: 100;
    font-style: normal;
    margin-bottom: 5px; /* Reduce gap between heading and content */
    margin-top: 20px; /* Add space above heading */
}

/* Content styling */
.about-content {
    color: #fff;
    font-family: "Lato", serif;
    font-weight: 400;
    font-style: normal;
    margin-bottom: 70px; /* Add space after content */
}

/* Add media queries here */
/* Ensure proper scaling and font sizes */
html {
    font-size: 16px;
}

/* Global adjustments for smaller screens */
@media (max-width: 1024px) {
    body {
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 0.85em;
    }
}

@media (max-width: 575px) {
    body {
        font-size: 0.80em;
    }
}

/* Adjust navigation menu for tablets and mobile */
@media (max-width: 1024px) {
    nav ul {
        gap: 0px;
    }

    nav ul li a {
        font-size: 1.1em;
    }
}

@media (max-width: 769px) {
    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 1em;
    }
}

@media (max-width: 575px) {
    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 0.9em; /* From 12px to 0.9em - better readability on very small screens */
        margin: 5px 0;
    }

    .btn-history {
        padding: 5px 10px; /* Smaller padding */
        font-size: 0.7em; /* Smallest readable font */
        top: 10px; /* Adjust position for mobile */
        right: 10px; /* Adjust position for mobile */
        margin: 0; /* Remove extra margin */
    }
}

@media (max-width: 768px) {
    .btn-history {
        padding: 8px 15px; /* Increase padding */
        font-size: 0.8em; /* Make font slightly larger */
        top: 15px; /* Adjust position */
        right: 15px; /* Adjust position */
    }
}

/* Responsive hero section */
@media (max-width: 1024px) {
    .hero-section .center h1 {
        font-size: 2.2em;
    }

    .hero-section .center p {
        font-size: 1.1em;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 250px;
        height: auto;
    }

    .hero-section .center h1 {
        font-size: 1.8em;
    }

    .hero-section .center p {
        font-size: 0.9em;
    }
}

@media (max-width: 575px) {
    .hero-section {
        padding-top: 20px;
        height: auto;
        margin-top: 120px;
    }

    .hero-section .center h1 {
        font-size: 1.5em;
    }

    .hero-section .center p {
        font-size: 0.8em;
    }
}

/* Responsive second part and last part */
@media (max-width: 1024px) {
    .wrapper .second-part,
    .wrapper .last-part {
        flex-direction: column;
        align-items: center;
    }

    .wrapper .second-part > div,
    .wrapper .last-part > div {
        width: 80%;
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .wrapper .second-part > div,
    .wrapper .last-part > div {
        width: 100%;
    }

    .wrapper >h2 {
        font-size: 42px;
        margin-top: 140px;
    }
}

/* Responsive playlist container */
@media (max-width: 768px) {
    .playlist-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* Responsive playlist form */
@media (max-width: 768px) {
    .playlist-form-box {
        padding: 10px;
    }

    .playlist-form-box .btn.connect-spotify {
        width: 60%;
        padding: 10px;
    }
}

/* Adjust other sections accordingly */
@media (max-width: 1024px) {
    .transfer-section .wrapper .content,
    .transfer-section .wrapper .image,
    .about-section .center {
        width: 100%;
    }

    .transfer-section .wrapper .content {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .transfer-section .wrapper .content,
    .about-section .center {
        width: 100%;
    }

    .transfer-section .wrapper .content {
        font-size: 0.9em;
    }

    .about-section .center {
        font-size: 1em;
    }
}

@media (max-width: 575px) {
    .transfer-section .wrapper .content,
    .about-section .center {
        width: 100%;
    }

    .transfer-section .wrapper .content {
        font-size: 1.2em;
    }

    .about-section .center {
        font-size: 0.8em;
    }
}

@media (max-width: 1024px) {
    .transfer-section-platform {
        font-size: 1.2em;
        margin: 160px auto;
    }

    .wrapper .second-part-platform {
        transform: scale(1.5);
        margin: 150px;
    }

    .wrapper >h2 {
        font-size: 29px;
    }

    .transfer-section .center .playlist-header {
        margin: 150px;
    }
}

@media (max-width: 768px) {
    .transfer-section-platform {
        font-size: 0.9em;
        margin: 130px auto;
    }

    .wrapper .second-part-platform {
        transform: scale(1.2);
        margin: 100px;
    }

    .transfer-section .center .playlist-header {
        margin: 140px;
    }
}

@media (max-width: 575px) {
    .transfer-section-platform {
        font-size: 0.7em;
        margin: 120px auto;
    }

    .wrapper .second-part-platform {
        transform: scale(0.7);
        margin: 80px;
    }
}

@media (max-width: 1024px) {

    .wrapper .playlist-page {
        width: 100%;
        background-size: 100%;
    }

    .playlist-form-box {
        width: 100%;
        padding: 20px;
        max-width: 700px;
    }
}

@media (max-width: 1024px) {
    .container .playlist-form-box > h1 {
        font-size: 1.8em; /* Larger for tablets */
    }
}
@media (max-width: 768px) {
    .container .playlist-form-box > h1 {
        font-size: 1.4em; /* Readable for smaller tablets */
    }
}

@media (max-width: 575px) {
    /* Prevent viewport zoom on input focus for iOS */
    input[type="text"], 
    input[type="email"], 
    input[type="url"], 
    textarea {
        font-size: 13px !important; /* Prevents zoom on iOS */
        transform: translateZ(0); /* Forces hardware acceleration */
    }

    /* Container adjustments for mobile keyboard */
    .container {
        min-height: 100vh;
        align-items: flex-start; /* Changed from center to flex-start */
        padding-top: 20vh; /* Add top padding instead of centering */
        padding-bottom: 10vh; /* Add bottom padding for keyboard space */
        transition: padding 0.3s ease; /* Smooth transition when keyboard appears */
    }

    /* Form box adjustments */
    .playlist-form-box {
        width: 95%;
        margin: 0 auto;
        position: relative;
        transform: none; /* Remove any transforms that might interfere */
    }

    /* Input field specific styling for mobile */
    .form-group input[type="text"] {
        padding: 15px 12px;
        font-size: 16px;
        border-radius: 8px;
        border: 2px solid #6A6868;
        background-color: rgba(255, 255, 255, 0.95);
        color: #000;
        width: 100%;
        box-sizing: border-box;
        /* Ensure input is always visible */
        position: relative;
        z-index: 10;
    }

    /* Add focused state styling */
    .form-group input[type="text"]:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.1);
        background-color: #fff;
    }

    /* Adjust button positioning for mobile */
    .btn.connect-spotify {
        margin-top: 15px;
        position: static; /* Ensure button doesn't float */
    }

    /* Transfer buttons container */
    #transfer-buttons {
        margin-top: 20px;
    }

    #transfer-buttons .btn {
        width: 100%;
        font-size: 10px;
    }

    .container .playlist-form-box > h1{
        font-size: 1.2em;
    }

    .wrapper .playlist-page {
        background-size: 100%;
    }
}

/* Specific fix for when keyboard is active */
@media (max-width: 575px) and (max-height: 500px) {
    /* This targets landscape mode or when keyboard is active (reduced viewport height) */
    .container {
        padding-top: 5vh;
        padding-bottom: 5vh;
        justify-content: flex-start;
    }

    .playlist-form-box {
        margin-top: 0;
    }

    /* Reduce header margin when space is limited */
    .container .playlist-form-box > h1 {
        margin-bottom: 15px;
        font-size: 1.1em;
    }
}

/* Additional fix for very small screens */
@media (max-width: 375px) {
    .container {
        padding: 15vh 5% 5vh 5%;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}

/* Ensure proper stacking context */
.playlist-page {
    position: relative;
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
}

.playlist-form-box {
    position: relative;
    z-index: 3;
}

@media (max-width: 575px) {

    .button-container .btn {
        font-size: 9px;
        margin-top: -10px;
        padding: 5px;
    }

    .wrapper .playlist-form-box .btn.btn-secondary {
        font-size: 9px;
        padding: 4px;
    }

    .wrapper .playlist-form-box .btn.connect-spotify {
        font-size: 10px;
        padding: 3px;
    }

    .table-container > h3 {
        font-size: 1em;
    }

    .hero-section .coming {
        height: 100vh;
        margin: 50px;
    }

    .transfer-section .center .playlist-header {
        margin: 40px;
    }

    .btn-history {
        position: absolute;
    }

    nav .logo img { 
        height: 40px; /* Readable size for mobile phones */
        width: auto;
        margin: 0; /* Adjust as needed */
    }

    nav ul li a {
        margin: 20px;
    }
}

@media (max-width: 1024px) {
    nav .logo img {
        height: 60px; /* Slightly smaller for tablets */
        width: auto;
        margin: 0 10px; /* Add some horizontal margin if needed */
    }
}

@media (max-width: 768px) {
    nav .logo img {
        height: 50px; /* Further reduced for smaller tablets/large phones */
        width: auto;
        margin: 0 5px;
    }
}

.error-container {
    text-align: center;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.error-container h1 {
    color: #e63946;
    margin-bottom: 1rem;
}

.error-container p {
    margin: 1rem 0;
    font-size: 1.1rem;
}