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

:root {
    --bg-deep: #0a0a12;
    --bg-surface: #111122;
    --sacred-deep: #1a1033;
    --gold-deep: #d4a843;
    --gold-light: #e8c96a;
    --gold-muted: rgba(212, 168, 67, 0.3);
    --violet-deep: #2d1b69;
    --violet-glow: #7c3aed;
    --text-light: #e8e4dc;
    --text-muted: rgba(232, 228, 220, 0.55);
    --font-body: 'Inter', sans-serif;
    --font-display: 'Cinzel', serif;
    --font-accent: 'Playfair Display', serif;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== Ambient Background ===== */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(125, 58, 237, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 168, 67, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 16, 51, 0.4) 0%, transparent 80%);
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    background: rgba(10, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.08);
}

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

.nav-logo {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--gold-light);
}

.nav-parent {
    color: var(--gold-deep) !important;
    font-style: italic;
    font-size: 0.78rem !important;
    opacity: 0.7;
}

.nav-parent:hover {
    opacity: 1 !important;
}

/* ===== Hamburger Button ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold-light);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 18, 0.97);
    backdrop-filter: blur(16px);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition);
    padding: 12px 24px;
}

.mobile-menu a:hover {
    color: var(--gold-light);
}

.mobile-parent-link {
    color: var(--gold-deep) !important;
    font-style: italic;
    font-size: 1.1rem !important;
    opacity: 0.8;
    margin-top: 16px;
    border-top: 1px solid rgba(212, 168, 67, 0.15);
    padding-top: 28px !important;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
    z-index: 1;
}

.hero-content {
    max-width: 700px;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold-deep);
    margin-bottom: 16px;
    opacity: 0.7;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.6rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1.1;
    margin-bottom: 12px;
    text-shadow: 0 0 60px rgba(212, 168, 67, 0.2);
}

.hero-subtitle {
    font-family: var(--font-accent);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 20px;
    opacity: 0.85;
}

.hero-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(124, 58, 237, 0.06) 0%, rgba(212, 168, 67, 0.04) 40%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* ===== Buttons ===== */
.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-light) 100%);
    color: var(--bg-deep);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 168, 67, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    color: var(--gold-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid var(--gold-muted);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-secondary:hover {
    background: rgba(212, 168, 67, 0.08);
    border-color: var(--gold-light);
}

/* ===== Sections ===== */
.section {
    position: relative;
    padding: 80px 24px;
    z-index: 1;
}

.section-dark {
    background: rgba(17, 17, 34, 0.5);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--gold-light);
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 40px;
}

/* ===== Create Song Form ===== */
.create-container {
    max-width: 680px;
    margin: 0 auto;
}

.create-form {
    background: linear-gradient(160deg, rgba(26, 16, 51, 0.5) 0%, rgba(10, 10, 18, 0.7) 100%);
    border: 1px solid rgba(212, 168, 67, 0.12);
    border-radius: 20px;
    padding: 36px 32px;
}

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

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(10, 10, 18, 0.6);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 10px;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    transition: var(--transition);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--gold-deep);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.1);
}

.form-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 10, 18, 0.6);
    border: 1px solid rgba(212, 168, 67, 0.15);
    border-radius: 10px;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23d4a843' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

.form-select:focus {
    outline: none;
    border-color: var(--gold-deep);
}

.form-select option {
    background: var(--bg-deep);
    color: var(--text-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn-generate-lyrics {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 20px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 8px;
    color: #a78bfa;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-generate-lyrics:hover {
    background: rgba(124, 58, 237, 0.25);
    border-color: rgba(124, 58, 237, 0.5);
}

.btn-create {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-icon {
    font-size: 1.1rem;
}

/* ===== Song Result ===== */
.song-result {
    margin-top: 24px;
    background: linear-gradient(160deg, rgba(26, 16, 51, 0.5) 0%, rgba(10, 10, 18, 0.7) 100%);
    border: 1px solid rgba(212, 168, 67, 0.12);
    border-radius: 20px;
    padding: 32px 28px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-title {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 1.3rem;
}

.result-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.result-status.generating {
    background: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.result-status.complete {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.result-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.audio-player {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 16px;
}

.audio-player::-webkit-media-controls-panel {
    background: rgba(26, 16, 51, 0.8);
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-download {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--gold-deep) 0%, var(--gold-light) 100%);
    color: var(--bg-deep);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-download:hover {
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.3);
}

.result-lyrics {
    background: rgba(10, 10, 18, 0.4);
    border: 1px solid rgba(212, 168, 67, 0.08);
    border-radius: 12px;
    padding: 20px;
    white-space: pre-wrap;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.8;
    max-height: 300px;
    overflow-y: auto;
}

.result-loading {
    text-align: center;
    padding: 32px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 168, 67, 0.2);
    border-top-color: var(--gold-light);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

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

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

/* ===== Pricing ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.pricing-card {
    position: relative;
    background: linear-gradient(160deg, rgba(26, 16, 51, 0.5) 0%, rgba(10, 10, 18, 0.7) 100%);
    border: 1px solid rgba(212, 168, 67, 0.1);
    border-radius: 20px;
    padding: 36px 28px;
    text-align: center;
    transition: var(--transition);
}

.pricing-card:hover {
    border-color: rgba(212, 168, 67, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card.featured {
    border-color: rgba(212, 168, 67, 0.25);
    box-shadow: 0 0 30px rgba(212, 168, 67, 0.08);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.3);
}

.pricing-badge.best {
    background: rgba(212, 168, 67, 0.15);
    color: var(--gold-light);
    border: 1px solid rgba(212, 168, 67, 0.3);
}

.pricing-amount {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--gold-light);
    margin-bottom: 4px;
}

.pricing-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 12px;
}

.pricing-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
    text-align: left;
}

.pricing-features li {
    padding: 5px 0;
    color: var(--text-light);
    font-size: 0.82rem;
    position: relative;
    padding-left: 20px;
}

.pricing-features li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--gold-deep);
    font-size: 0.65rem;
}

.btn-price {
    width: 100%;
    padding: 12px;
    font-size: 0.88rem;
}

/* ===== Library ===== */
.library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.library-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.library-empty p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.song-card {
    background: linear-gradient(160deg, rgba(26, 16, 51, 0.4) 0%, rgba(10, 10, 18, 0.6) 100%);
    border: 1px solid rgba(212, 168, 67, 0.1);
    border-radius: 16px;
    padding: 20px;
    transition: var(--transition);
}

.song-card:hover {
    border-color: rgba(212, 168, 67, 0.2);
}

.song-card-title {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 1rem;
    margin-bottom: 4px;
}

.song-card-genre {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.song-card audio {
    width: 100%;
    margin-bottom: 8px;
}

.song-card-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ===== Footer ===== */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(212, 168, 67, 0.08);
    padding: 50px 24px 0;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer-logo {
    font-family: var(--font-display);
    color: var(--gold-light);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: italic;
}

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

.footer-col h4 {
    color: var(--gold-light);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.83rem;
    margin-bottom: 8px;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    max-width: 1100px;
    margin: 36px auto 0;
    padding: 18px 0;
    border-top: 1px solid rgba(212, 168, 67, 0.06);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.73rem;
    opacity: 0.6;
}

.footer-bottom a {
    color: var(--gold-deep);
    text-decoration: none;
}

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

    .hamburger {
        display: flex;
    }

    .hero-title {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-description {
        text-align: left;
        line-height: 1.6;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .create-form {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .form-textarea,
    .form-select {
        padding: 14px 16px;
        border-radius: 10px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 28px;
    }

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

    .footer-links {
        display: flex;
        justify-content: space-evenly;
        width: 100%;
        gap: 24px;
    }

    .footer-col {
        flex: 1;
    }
}

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 50px 16px;
    }
}
