/* ============================================
   MUZICA CONVERTER - muzica.rarescojocariu.ro
   ============================================ */

:root {
    --color-primary: #3452ff;
    --color-primary-hover: #2a42cc;
    --color-bg: #0a0a0a;
    --color-surface: rgba(255, 255, 255, 0.04);
    --color-surface-hover: rgba(255, 255, 255, 0.08);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.5);
    --color-text-light: rgba(255, 255, 255, 0.7);
    --color-error: #ff4444;
    --color-success: #44ff88;
    --font-body: 'Inter', 'Space Grotesk', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    background: linear-gradient(160deg, #0a0a0a 0%, #0a1628 35%, #140a28 65%, #0a0a0a 100%);
    background-attachment: fixed;
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #6b7fff;
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--color-text) !important;
    letter-spacing: -0.02em;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--color-border);
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--color-text);
    border-color: var(--color-primary);
    background: rgba(52, 82, 255, 0.1);
}

/* Main content */
.main-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
}

/* Hero */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.accent {
    color: var(--color-text);
}

.subtitle {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Converter card */
.converter-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

/* Input */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label,
.select-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
}

.input-wrapper input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    padding-right: 3rem;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color var(--transition);
    outline: none;
    width: 100%;
}

.input-wrapper input:focus {
    border-color: var(--color-primary);
}

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

.btn-paste {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    transition: all var(--transition);
}

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

.platform-detected {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-primary);
    min-height: 1.2em;
}

/* Options */
.options-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

select {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

select:focus {
    border-color: var(--color-primary);
}

select option {
    background: #1a1a2e;
    color: var(--color-text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(52, 82, 255, 0.3);
    color: white;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-outline {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-outline:hover {
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

.btn-convert {
    width: 100%;
}

.btn-convert .btn-loading {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.btn-convert.loading .btn-text {
    display: none;
}

.btn-convert.loading .btn-loading {
    display: inline-flex;
}

.spinner {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

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

/* Progress */
.progress-section {
    display: none;
    margin-top: 1.5rem;
}

.progress-section.visible {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), #6b7fff);
    border-radius: 3px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(52, 82, 255, 0.5);
}

.progress-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* Result */
.result-section {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: rgba(68, 255, 136, 0.05);
    border: 1px solid rgba(68, 255, 136, 0.15);
    border-radius: var(--radius-sm);
}

.result-section.visible {
    display: block;
}

.result-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.result-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--color-surface);
    overflow: hidden;
    flex-shrink: 0;
}

.result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-details h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

.result-details p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.btn-download {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
}

/* Error */
.error-section {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 68, 68, 0.08);
    border: 1px solid rgba(255, 68, 68, 0.2);
    border-radius: var(--radius-sm);
}

.error-section.visible {
    display: block;
}

.error-section p {
    color: var(--color-error);
    font-size: 0.9rem;
}

/* Playlist */
.playlist-section {
    display: none;
    margin-top: 1.5rem;
}

.playlist-section.visible {
    display: block;
}

.playlist-header {
    margin-bottom: 1rem;
}

.playlist-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.playlist-header p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.playlist-actions {
    display: flex;
    gap: 0.5rem;
}

.playlist-tracks {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.playlist-tracks::-webkit-scrollbar {
    width: 6px;
}

.playlist-tracks::-webkit-scrollbar-track {
    background: transparent;
}

.playlist-tracks::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.playlist-track {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background var(--transition);
}

.playlist-track:last-child {
    border-bottom: none;
}

.playlist-track:hover {
    background: var(--color-surface-hover);
}

.playlist-track.selected {
    background: rgba(52, 82, 255, 0.08);
}

.playlist-track input[type="checkbox"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.track-number {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

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

.track-title {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

/* Guide */
.guide-section,
.info-section {
    margin-top: 4rem;
    text-align: center;
}

.guide-section h2,
.info-section h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.guide-step {
    padding: 2rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all var(--transition);
}

.guide-step:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.guide-step h3 {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.guide-step p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Info cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.info-card {
    padding: 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: left;
    transition: all var(--transition);
}

.info-card:hover {
    background: var(--color-surface-hover);
}

.info-card h3 {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.info-card p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    line-height: 1.5;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Disclaimer */
.disclaimer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.disclaimer-overlay.visible {
    display: flex;
}

.disclaimer-modal {
    background: #141428;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 500px;
    text-align: center;
}

.disclaimer-modal h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.disclaimer-modal p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.disclaimer-modal .btn {
    margin-top: 0.5rem;
}

/* Cookie banner */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--color-border);
    padding: 1rem 2rem;
    z-index: 9999;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-banner.visible {
    display: flex;
}

.cookie-banner p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin: 0;
}

.cookie-btns {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 100px 1rem 3rem;
    }

    .converter-card {
        padding: 1.5rem;
    }

    .options-row {
        grid-template-columns: 1fr;
    }

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

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

    .result-info {
        flex-direction: column;
        text-align: center;
    }

    .result-details h3 {
        max-width: 100%;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .header-inner {
        padding: 0 1rem;
    }
}
