/* Retro style for SpotifyWrapped */

/* Reset conflicting styles */
body {
    font-family: 'IBM Plex Mono', 'Fira Mono', monospace !important;
    background: radial-gradient(ellipse at 60% 40%, #f7e7d3 60%, #e2c9b0 100%);
    color: #23201e;
    margin: 0;
    padding: 0;
    letter-spacing: 1px;
    min-height: 100vh;
}

/* Header */
.retro-header {
    background: #23201e;
    border-bottom: 4px solid #bfa07a;
    box-shadow: 0 4px 24px 0 #bfa07a33;
    padding: 1rem 0;
}

.retro-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.retro-title {
    font-size: 3rem;
    font-weight: 700;
    color: #bfa07a;
    letter-spacing: 2px;
    margin: 0;
}

/* Buttons */
.retro-btn, select.retro-btn {
    font-family: 'IBM Plex Mono', monospace;
    background: #bfa07a;
    color: #23201e;
    border: 2px solid #23201e;
    border-radius: 12px;
    box-shadow: 2px 2px 0 #23201e;
    font-size: 1.1rem;
    font-weight: bold;
    padding: 12px 28px;
    margin: 0 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.retro-btn:hover, select.retro-btn:focus {
    background: #e2c9b0;
    outline: none;
}

/* Hero Section */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24rem; /* 96 */
    text-align: center;
    padding: 0 1rem;
}

#hero h2.retro-title {
    margin-bottom: 1rem;
    color: #23201e;
}

#hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #23201e;
    max-width: 600px;
    line-height: 1.5;
}

/* Cards */
.retro-card {
    background: #fff7ed;
    border: 2.5px solid #bfa07a;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 #bfa07a33;
    padding: 1.5rem;
    color: #23201e;
}

.retro-shadow {
    box-shadow: 0 8px 32px 0 #bfa07a55;
}

.retro-label {
    color: #bfa07a;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Text */
.text-green-500 {
    color: #3a6b35;
}

.text-gray-400 {
    color: #7a6f5a;
}

/* Responsive Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pie Chart Section */
#pieChartSection {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #fff7ed;
    border: 2.5px solid #bfa07a;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 #bfa07a33;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

#mainPieChart {
    width: 300px !important;
    height: 300px !important;
    max-width: 300px !important;
    max-height: 300px !important;
}

#pieChartTitle, .piechart-title {
    font-size: 2rem;
    font-weight: 700;
    color: #bfa07a;
    margin-bottom: 0;
    text-align: left;
    min-width: 160px;
}

@media (max-width: 900px) {
    #pieChartSection, .piechart-responsive {
        flex-direction: column !important;
        gap: 1rem;
    }
    #mainPieChart {
        width: 180px !important;
        height: 180px !important;
        max-width: 180px !important;
        max-height: 180px !important;
    }
    #pieChartTitle, .piechart-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        text-align: center;
    }
}

/* Wrapped Summary */
#wrappedSummary {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    #wrappedSummary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading Spinner */
#loadingSpinner {
    position: fixed;
    inset: 0;
    background-color: rgba(35, 32, 30, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.animate-spin {
    border-top-color: #bfa07a;
    border-right-color: transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .retro-title {
        font-size: 2rem;
    }
    #hero {
        height: auto;
        padding: 2rem 1rem;
    }
    #hero p {
        font-size: 1rem;
        max-width: 100%;
    }
    .retro-btn, select.retro-btn {
        font-size: 1rem;
        padding: 10px 20px;
        margin: 0 4px;
    }
    .retro-card {
        padding: 1rem;
        border-radius: 12px;
    }
    #pieChartSection {
        width: 100%;
        max-width: 280px;
        padding: 1rem;
    }
    #mainPieChart {
        width: 180px !important;
        height: 180px !important;
        max-width: 180px !important;
        max-height: 180px !important;
    }
    #pieChartSection h3 {
        font-size: 1.2rem;
    }
    #wrappedSummary {
        grid-template-columns: 1fr;
    }
}

/* Artist image size and style */
.artist-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #bfa07a;
    margin-bottom: 0.5rem;
    background: #e2c9b0;
    box-shadow: 0 2px 8px #bfa07a33;
}

@media (max-width: 900px) {
    .artist-image {
        width: 36px;
        height: 36px;
    }
}

/* Artist card responsive */
.artist-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.artist-name {
    font-size: 1rem;
    color: #23201e;
}

@media (max-width: 900px) {
    .artist-card {
        flex-direction: row;
        gap: 0.5rem;
    }
    .artist-name {
        font-size: 0.95rem;
    }
}

/* Track item responsive */
.track-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.track-number {
    font-weight: bold;
    color: #bfa07a;
    min-width: 1.5rem;
}
.track-info {
    flex: 1;
}

@media (max-width: 900px) {
    .track-item {
        gap: 0.5rem;
    }
    .track-number {
        min-width: 1.2rem;
    }
}

/* Hide utility for JS */
.hidden { display: none !important; }
