/* CSS Variables */
:root {
    --spotify-green: #1DB954;
    --spotify-green-hover: #1ed760;
    --bg-primary: #121212;
    --bg-secondary: #181818;
    --bg-tertiary: #282828;
    --bg-hover: #333333;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #727272;
    --border-color: #333333;
    --card-bg: #181818;
    --gradient-start: #1DB954;
    --gradient-end: #191414;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.app {
    min-height: 100vh;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 500px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--spotify-green);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background-color: var(--spotify-green-hover);
    transform: scale(1.04);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    font-size: 14px;
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-primary);
}

.btn-spotify {
    background-color: var(--spotify-green);
    color: var(--bg-primary);
    padding: 12px 24px;
    font-size: 14px;
}

.btn-spotify:hover {
    background-color: var(--spotify-green-hover);
    transform: scale(1.02);
}

/* Landing Page */
.login-section {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    overflow-x: hidden;
}

/* Landing Navigation */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 120px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20%;
    width: 140%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 20%, rgba(29, 185, 84, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 80%, rgba(29, 185, 84, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(29, 185, 84, 0.15);
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 500px;
    font-size: 14px;
    font-weight: 500;
    color: var(--spotify-green);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--spotify-green) 0%, #1ed760 50%, var(--spotify-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

.hero-disclaimer {
    font-size: 14px;
    color: var(--text-muted);
}

/* Hero Visual / Preview Card */
.hero-visual {
    flex: 1;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.preview-card {
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.preview-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.preview-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-hover));
}

.preview-info {
    flex: 1;
}

.preview-name {
    height: 20px;
    width: 120px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin-bottom: 8px;
}

.preview-email {
    height: 14px;
    width: 160px;
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.preview-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.preview-stat {
    text-align: center;
}

.preview-stat-value {
    height: 24px;
    width: 40px;
    background: var(--spotify-green);
    border-radius: 4px;
    margin: 0 auto 8px;
    opacity: 0.6;
}

.preview-stat-label {
    height: 12px;
    width: 60px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    margin: 0 auto;
}

.preview-tracks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-track {
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 8px;
}

/* Section Container */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-heading {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

/* Features Section */
.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--spotify-green);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(29, 185, 84, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--spotify-green);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works-section {
    padding: 100px 0;
    background: var(--bg-primary);
}

.steps-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 280px;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--spotify-green);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-content p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: var(--border-color);
    margin-top: 32px;
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.faq-item {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--border-color);
}

.faq-item h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.faq-item p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item a {
    color: var(--spotify-green);
    text-decoration: none;
}

.faq-item a:hover {
    text-decoration: underline;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.1) 0%, var(--bg-primary) 50%, rgba(29, 185, 84, 0.05) 100%);
}

.cta-content {
    text-align: center;
}

.cta-content h2 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Landing Footer */
.landing-footer {
    padding: 60px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.footer-disclaimer {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 12px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-muted);
}

/* Landing Page Responsive */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        gap: 60px;
        text-align: center;
        padding-top: 100px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 44px;
    }

    .hero-cta {
        align-items: center;
    }

    .hero-visual {
        max-width: 350px;
    }

    .preview-card {
        transform: none;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-connector {
        display: none;
    }

    .steps-container {
        gap: 48px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .section-heading {
        font-size: 32px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .cta-content h2 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .btn-large {
        padding: 16px 32px;
        font-size: 16px;
    }

    .section-heading {
        font-size: 28px;
    }

    .feature-card {
        padding: 24px;
    }
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Profile Card */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 32px;
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-radius: 24px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.2) 0%, transparent 60%);
}

.profile-image-container {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--spotify-green);
    box-shadow: 0 8px 32px rgba(29, 185, 84, 0.3);
}

.profile-info {
    position: relative;
    z-index: 1;
}

.display-name {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
}

.user-email {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
}

.profile-stats {
    display: flex;
    gap: 48px;
    margin-bottom: 24px;
    justify-content: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Time Range Selector */
.time-range-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.time-btn {
    padding: 12px 24px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 500px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.time-btn.active {
    background: var(--spotify-green);
    color: var(--bg-primary);
}

/* Content Sections */
.content-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--spotify-green);
    border-radius: 2px;
}

/* Artists Grid */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.artist-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.artist-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-4px);
}

.artist-image {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.artist-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.artist-rank {
    font-size: 12px;
    color: var(--text-muted);
}

/* Tracks List */
.tracks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.track-item:hover {
    background: var(--bg-tertiary);
}

.track-rank {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 24px;
    text-align: center;
}

.track-image {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    font-size: 14px;
    color: var(--text-muted);
}

.track-album {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 18, 18, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--spotify-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 40px 24px;
    }

    .login-container h1 {
        font-size: 24px;
    }

    .profile-card {
        padding: 32px 20px;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .display-name {
        font-size: 32px;
    }

    .profile-stats {
        gap: 24px;
    }

    .stat-value {
        font-size: 22px;
    }

    .artists-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .artist-image {
        width: 100px;
        height: 100px;
    }

    .track-album {
        display: none;
    }

    .time-range-selector {
        gap: 8px;
    }

    .time-btn {
        padding: 10px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .profile-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .track-item {
        padding: 10px 12px;
        gap: 12px;
    }

    .track-image {
        width: 48px;
        height: 48px;
    }

    .track-duration {
        display: none;
    }
}

/* Placeholder for empty states */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Error message */
.error-message {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.3);
    color: #ff6b6b;
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    text-align: center;
}
