/* Spotid Sync - Main Styles */

/* ============== Variables ============== */
:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --spotify-green: #1DB954;
    --tidal-cyan: #00FFFF;
    --gradient-start: #1DB954;
    --gradient-end: #00FFFF;
    --error: #ff4757;
    --success: #2ed573;
    --border-color: #2a2a35;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============== Layout ============== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============== Navigation ============== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
}

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

.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============== Buttons ============== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(29, 185, 84, 0.3);
}

.btn-ghost {
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.btn-large {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

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

.btn-spotify:hover {
    background: #1ed760;
}

.btn-tidal {
    background: var(--tidal-cyan);
    color: var(--bg-dark);
}

.btn-tidal:hover {
    background: #33ffff;
}

.btn-google {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    width: 100%;
    padding: 12px;
}

.btn-google:hover {
    background: var(--bg-card-hover);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

/* ============== Wave Background ============== */
.wave-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.wave-background canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ============== Hero Section ============== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.spotify-text {
    color: var(--spotify-green);
}

.tidal-text {
    color: var(--tidal-cyan);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-platforms {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.platform {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.platform svg {
    width: 32px;
    height: 32px;
}

.platform.spotify svg {
    color: var(--spotify-green);
}

.platform.tidal svg {
    color: var(--tidal-cyan);
}

.sync-arrow {
    width: 100px;
}

.arrow-line {
    height: 4px;
    background: linear-gradient(90deg, var(--spotify-green), var(--tidal-cyan));
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.arrow-wave {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, white, transparent);
    animation: arrow-flow 2s linear infinite;
}

@keyframes arrow-flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============== Sections ============== */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============== Features ============== */
.features {
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(10px);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

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

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--spotify-green);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--spotify-green), var(--tidal-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--bg-dark);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============== How It Works ============== */
.how-it-works {
    background: rgba(18, 18, 26, 0.9);
    backdrop-filter: blur(10px);
}

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

.step {
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 220px;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--spotify-green), var(--tidal-cyan));
    color: var(--bg-dark);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 10px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.step-connector {
    width: 60px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.connector-wave {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--spotify-green), var(--tidal-cyan));
    animation: connector-flow 3s linear infinite;
}

@keyframes connector-flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ============== CTA Section ============== */
.cta-section {
    text-align: center;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
}

.cta-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 60px 40px;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ============== Footer ============== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
    background: rgba(5, 5, 10, 0.95);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-column h4 {
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============== Modal ============== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    margin: 20px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ============== Auth Form ============== */
.auth-form h2 {
    text-align: center;
    margin-bottom: 5px;
}

.auth-form > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--spotify-green);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--spotify-green);
    font-weight: 500;
}

/* ============== Dashboard ============== */
.dashboard-page {
    padding-top: 90px;
}

.dashboard {
    padding: 20px 0 60px;
    position: relative;
    z-index: 1;
}

.dashboard h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
}

/* Connection Cards */
.connections-section {
    margin-bottom: 40px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
}

.connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.connection-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.connection-card:hover {
    border-color: var(--text-muted);
}

.connection-card.connected {
    border-color: var(--success);
}

.connection-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.connection-icon.spotify {
    background: rgba(29, 185, 84, 0.15);
    color: var(--spotify-green);
}

.connection-icon.tidal {
    background: rgba(0, 255, 255, 0.15);
    color: var(--tidal-cyan);
}

.connection-icon.large {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.connection-icon svg {
    width: 32px;
    height: 32px;
}

.connection-info {
    flex: 1;
}

.connection-info h3 {
    margin-bottom: 5px;
}

.connection-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.connection-status.connected {
    color: var(--success);
}

.connection-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Sync Section */
.sync-section {
    margin-bottom: 40px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

/* Direction Selector */
.direction-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.platform-box {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 140px;
    transition: all 0.3s ease;
}

.platform-box.source {
    border-color: rgba(29, 185, 84, 0.4);
}

.platform-box.destination {
    border-color: rgba(0, 255, 255, 0.4);
}

.platform-box .platform-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-box .platform-icon.spotify {
    background: rgba(29, 185, 84, 0.15);
    color: var(--spotify-green);
}

.platform-box .platform-icon.tidal {
    background: rgba(0, 255, 255, 0.15);
    color: var(--tidal-cyan);
}

.platform-box .platform-icon svg {
    width: 40px;
    height: 40px;
}

.platform-box .platform-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.platform-box .platform-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.direction-arrow {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.direction-arrow:hover {
    border-color: var(--spotify-green);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.3);
}

.direction-arrow svg {
    width: 50px;
    height: 25px;
    transition: transform 0.4s ease;
}

.direction-arrow.reversed svg {
    transform: scaleX(-1);
}

.direction-arrow.reversed #arrowGradient stop:first-child {
    stop-color: #00FFFF;
}

.direction-arrow.reversed #arrowGradient stop:last-child {
    stop-color: #1DB954;
}

.direction-arrow.animating svg {
    animation: arrowPulse 0.4s ease;
}

@keyframes arrowPulse {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(0); }
}

.direction-arrow.reversed.animating svg {
    animation: arrowPulseReverse 0.4s ease;
}

@keyframes arrowPulseReverse {
    0% { transform: scaleX(-1); }
    50% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

.swap-hint {
    position: absolute;
    bottom: -25px;
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.direction-arrow:hover .swap-hint {
    opacity: 1;
}

.sync-section .sync-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1rem;
}

.sync-section .sync-description strong {
    color: var(--text-primary);
}

.start-sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 40px;
    font-size: 1.1rem;
}

.start-sync-btn svg {
    transition: transform 0.3s;
}

.start-sync-btn:hover svg {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .direction-selector {
        flex-direction: column;
        gap: 15px;
    }
    
    .direction-arrow {
        transform: rotate(90deg);
    }
    
    .direction-arrow:hover {
        transform: rotate(90deg) scale(1.1);
    }
    
    .swap-hint {
        display: none;
    }
}

.sync-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.sync-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sync-btn:hover {
    border-color: var(--spotify-green);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.sync-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.sync-from, .sync-to {
    font-size: 1.1rem;
    font-weight: 600;
}

.sync-arrow-animated svg {
    width: 60px;
    height: 20px;
}

.sync-arrow-animated.reverse svg {
    transform: scaleX(-1);
}

.sync-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.plan-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(29, 185, 84, 0.1);
    border-radius: 10px;
}

.plan-badge {
    background: var(--spotify-green);
    color: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.plan-limit {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.upgrade-link {
    color: var(--spotify-green);
    font-size: 0.9rem;
    margin-left: auto;
}

/* Sync Progress */
.sync-progress-section {
    margin-bottom: 40px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
}

.sync-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.sync-animation {
    margin-bottom: 30px;
}

.wave-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 60px;
    gap: 6px;
}

.wave-bars .bar {
    width: 8px;
    background: linear-gradient(to top, var(--spotify-green), var(--tidal-cyan));
    border-radius: 4px;
    animation: wave-bar 1s ease-in-out infinite;
}

.wave-bars .bar:nth-child(1) { animation-delay: 0s; }
.wave-bars .bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bars .bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bars .bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bars .bar:nth-child(5) { animation-delay: 0.4s; }
.wave-bars .bar:nth-child(6) { animation-delay: 0.5s; }
.wave-bars .bar:nth-child(7) { animation-delay: 0.6s; }
.wave-bars .bar:nth-child(8) { animation-delay: 0.7s; }

@keyframes wave-bar {
    0%, 100% { height: 20px; }
    50% { height: 60px; }
}

.sync-progress-card h3 {
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--spotify-green), var(--tidal-cyan));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Sync Complete */
.sync-complete-card {
    background: var(--bg-card);
    border: 1px solid var(--success);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(46, 213, 115, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--success);
}

.sync-results {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
}

.result-item {
    text-align: center;
}

.result-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.result-item.success .result-number {
    color: var(--success);
}

.result-item.failed .result-number {
    color: var(--error);
}

.result-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Activity */
.activity-section {
    padding: 30px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

.activity-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.no-activity {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon.success {
    background: rgba(46, 213, 115, 0.15);
    color: var(--success);
}

.activity-icon.failed {
    background: rgba(255, 71, 87, 0.15);
    color: var(--error);
}

.activity-info {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 3px;
}

.activity-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Tidal Login Modal */
.tidal-login {
    text-align: center;
}

.tidal-login h2 {
    margin-bottom: 10px;
}

.tidal-login > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tidal-code {
    font-family: monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    background: var(--bg-dark);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.tidal-waiting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 20px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--tidal-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============== Responsive ============== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-platforms {
        flex-direction: column;
    }
    
    .sync-arrow {
        transform: rotate(90deg);
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-connector {
        transform: rotate(90deg);
        width: 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
}

/* ============== New Sync Interface ============== */
.sync-interface {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.sync-title {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(90deg, var(--spotify-green), var(--tidal-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sync-subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Direction Selector Full */
.direction-selector-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.platform-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.platform-card.connected {
    border-color: var(--success);
}

.platform-header {
    margin-bottom: 15px;
}

.platform-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.platform-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.platform-card .platform-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-card .platform-icon.spotify {
    background: rgba(29, 185, 84, 0.15);
    color: var(--spotify-green);
}

.platform-card .platform-icon.tidal {
    background: rgba(0, 255, 255, 0.15);
    color: var(--tidal-cyan);
}

.platform-card .platform-icon svg {
    width: 45px;
    height: 45px;
}

.platform-card .platform-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.platform-card .platform-status {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.platform-card .platform-status.connected {
    color: var(--success);
}

.platform-card .connect-btn {
    width: 100%;
}

/* Direction Arrow */
.direction-arrow-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.direction-arrow-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.direction-arrow-btn:hover {
    border-color: var(--spotify-green);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(29, 185, 84, 0.3);
}

.direction-arrow-btn svg {
    width: 50px;
    height: 25px;
    transition: transform 0.4s ease;
}

.direction-arrow-btn.reversed svg {
    transform: scaleX(-1);
}

.direction-arrow-btn.animating svg {
    animation: arrowFlip 0.4s ease;
}

@keyframes arrowFlip {
    0% { transform: scaleX(1); }
    50% { transform: scaleX(0); }
    100% { transform: scaleX(-1); }
}

.direction-arrow-btn.reversed.animating svg {
    animation: arrowFlipBack 0.4s ease;
}

@keyframes arrowFlipBack {
    0% { transform: scaleX(-1); }
    50% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

.arrow-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s;
}

.direction-arrow-container:hover .arrow-hint {
    opacity: 1;
}

/* Ready Message */
.ready-message {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.3);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.ready-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: rgba(46, 213, 115, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
}

.ready-icon svg {
    width: 30px;
    height: 30px;
}

.ready-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.ready-message .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ============== Playlist Selector Modal ============== */
.playlist-selector {
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
}

.playlist-header h2 {
    margin-bottom: 5px;
}

.playlist-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Track Limit Bar */
.track-limit-bar {
    padding: 20px 30px;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.limit-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.limit-max {
    color: var(--text-secondary);
}

.limit-progress {
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

.limit-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--spotify-green), var(--tidal-cyan));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.limit-fill.over-limit {
    background: var(--error);
}

.limit-warning {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 10px;
}

.limit-warning a {
    color: var(--tidal-cyan);
}

/* Playlist List */
.playlist-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    max-height: 400px;
}

.loading-playlists {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: var(--text-secondary);
}

/* Playlist Search Box */
.playlist-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    margin: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.playlist-search-box:focus-within {
    border-color: var(--spotify-green);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.1);
}

.playlist-search-box .search-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.playlist-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 0;
}

.playlist-search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-results p {
    margin: 0;
}

.search-results-count {
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    cursor: pointer;
    transition: background 0.2s;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.playlist-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
}

.playlist-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.playlist-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
}

.playlist-item:hover .checkmark {
    border-color: var(--spotify-green);
}

.playlist-checkbox input:checked ~ .checkmark {
    background: var(--spotify-green);
    border-color: var(--spotify-green);
}

.playlist-checkbox .checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.playlist-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.playlist-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.playlist-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-icon.liked {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.playlist-icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.playlist-icon.liked svg {
    color: white;
}

.playlist-info {
    flex: 1;
    text-align: left;
}

.playlist-info h4 {
    font-size: 1rem;
    margin-bottom: 3px;
}

.playlist-info .track-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Locked Playlist Item (Free Plan) */
.playlist-item.locked {
    opacity: 0.7;
    cursor: pointer;
}

.playlist-item.locked:hover {
    background: rgba(139, 92, 246, 0.1);
}

.playlist-item.locked .lock-icon {
    color: var(--text-muted);
}

.premium-badge {
    display: inline-block;
    background: linear-gradient(90deg, #8b5cf6, #a855f7);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Playlist Actions */
.playlist-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
}

.playlist-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Playlist Expand Arrow */
.playlist-expand {
    color: var(--text-muted);
    transition: transform 0.2s;
    margin-left: auto;
}

.playlist-item:hover .playlist-expand {
    color: var(--text-primary);
    transform: translateX(3px);
}

/* Track List View */
.track-list-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 30px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
    position: sticky;
    top: 0;
    z-index: 10;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.track-list-title {
    flex: 1;
}

.track-list-title h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.track-list-title .track-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.select-all-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.select-all-btn:hover {
    border-color: var(--spotify-green);
}

.select-all-btn.active {
    background: var(--spotify-green);
    border-color: var(--spotify-green);
}

/* Track Items */
.track-items {
    padding: 10px 0;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 30px;
    cursor: pointer;
    transition: background 0.2s;
}

.track-item:hover {
    background: rgba(255,255,255,0.05);
}

.track-item.selected {
    background: rgba(29, 185, 84, 0.1);
}

.track-item .track-checkbox {
    position: relative;
    width: 20px;
    height: 20px;
}

.track-item .track-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.track-item .track-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.track-item:hover .track-checkbox .checkmark {
    border-color: var(--spotify-green);
}

.track-item .track-checkbox input:checked ~ .checkmark {
    background: var(--spotify-green);
    border-color: var(--spotify-green);
}

.track-item .track-checkbox .checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.track-item .track-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.track-number {
    width: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.track-name {
    display: block;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive */
@media (max-width: 768px) {
    .direction-selector-full {
        flex-direction: column;
        gap: 20px;
    }
    
    .direction-arrow-container {
        transform: rotate(90deg);
    }
    
    .platform-card {
        width: 100%;
        max-width: 280px;
    }
    
    .sync-interface {
        padding: 25px;
    }
    
    .playlist-selector {
        max-height: 90vh;
    }
    
    .playlist-item {
        padding: 12px 20px;
    }
}


/* ============== Usage Banner ============== */
.usage-banner {
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.1), rgba(0, 255, 255, 0.1));
    border: 1px solid rgba(29, 185, 84, 0.3);
    border-radius: 16px;
    padding: 20px 30px;
    margin-bottom: 30px;
}

.usage-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.usage-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.usage-icon {
    font-size: 1.5rem;
}

.usage-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.usage-text strong {
    color: var(--text-primary);
}

.usage-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--spotify-green), var(--tidal-cyan));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.usage-bar-fill.warning {
    background: linear-gradient(90deg, #f0a500, #e74c3c);
}

.usage-bar-fill.danger {
    background: #e74c3c;
}

.usage-warning {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
}

.usage-warning a {
    color: var(--spotify-green);
    font-weight: 600;
    text-decoration: underline;
}

.usage-warning a:hover {
    color: var(--tidal-cyan);
}

/* Limit reached state */
.usage-banner.limit-reached {
    border-color: rgba(231, 76, 60, 0.5);
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.05));
}

.usage-banner.limit-reached .usage-text strong {
    color: #e74c3c;
}
