@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;700&display=swap');

:root {
    --bg-dark: #0a0c16;
    --bg-card: rgba(18, 22, 41, 0.75);
    --bg-card-hover: rgba(26, 32, 59, 0.85);
    --primary: #7928ca;
    --primary-glow: rgba(121, 40, 202, 0.4);
    --secondary: #ff0080;
    --secondary-glow: rgba(255, 0, 128, 0.4);
    --cyan: #00dfd8;
    --cyan-glow: rgba(0, 223, 216, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(121, 40, 202, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(255, 0, 128, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 223, 216, 0.08) 0%, transparent 50%);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Header & Brand */
header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;
    background: rgba(121, 40, 202, 0.15);
    border: 1px solid rgba(121, 40, 202, 0.3);
    color: var(--cyan);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 0 15px rgba(0, 223, 216, 0.2);
}

h1.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, var(--cyan) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

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

/* Main Input Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.input-group {
    display: flex;
    gap: 12px;
    position: relative;
}

.url-input {
    flex: 1;
    background: rgba(10, 12, 22, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.4rem;
    font-size: 1rem;
    color: #fff;
    outline: none;
    transition: var(--transition);
}

.url-input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 20px var(--cyan-glow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--secondary-glow);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Progress Tracker Section */
.status-card {
    display: none;
    margin-bottom: 2rem;
}

.status-card.active {
    display: block;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.step-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--cyan);
}

.percentage {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--secondary);
}

.progress-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--cyan));
    background-size: 200% 200%;
    animation: gradientMove 2s ease infinite;
    border-radius: 10px;
    transition: width 0.4s ease-in-out;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.pipeline-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.step-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.step-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.step-pct {
    font-size: 1rem;
    font-weight: 800;
    color: var(--cyan);
}

.step-box.done {
    border-color: var(--cyan);
    color: #fff;
    background: rgba(0, 223, 216, 0.1);
}

.step-box.active {
    border-color: var(--secondary);
    color: #fff;
    background: rgba(255, 0, 128, 0.15);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Studio Preview & Player */
.result-card {
    display: none;
}

.result-card.active {
    display: block;
}

.video-container {
    position: relative;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

video {
    width: 100%;
    display: block;
    max-height: 500px;
}

.lyrics-overlay {
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 1rem 2rem;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.current-lyric-line {
    font-family: 'Outfit', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.95), 0 0 20px rgba(0, 223, 216, 0.7);
    min-height: 2.6rem;
    margin-bottom: 6px;
}

.next-lyric-line {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 2px 8px rgba(0,0,0,0.9);
    min-height: 1.8rem;
    letter-spacing: 0.5px;
}

.word-span {
    display: inline-block;
    margin: 0 4px;
    transition: all 0.15s ease;
}

.word-span.active-word {
    color: #ff0080;
    transform: scale(1.15);
    text-shadow: 0 0 20px #ff0080, 0 0 30px #00dfd8;
}

/* Controls & Downloads */
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-download {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--cyan);
    color: var(--cyan);
    transform: translateY(-2px);
}

.btn-download.primary-dl {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #fff;
    box-shadow: 0 5px 20px var(--primary-glow);
}

.btn-download.primary-dl:hover {
    box-shadow: 0 8px 25px var(--secondary-glow);
}

footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
