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

/* ==========================================================================
   🎨 Design System – Suno AI Studio
   ========================================================================== */
:root {
    /* Palette */
    --col-base: #030014;
    --col-glass: rgba(255, 255, 255, 0.03);
    --col-glass-hover: rgba(255, 255, 255, 0.06);
    --col-border: rgba(255, 255, 255, 0.08);
    --col-purple: #8b5cf6;
    --col-cyan: #22d3ee;
    --col-pink: #e879f9;

    /* Text */
    --t-primary: #ffffff;
    --t-secondary: rgba(255, 255, 255, 0.65);
    --t-muted: rgba(255, 255, 255, 0.35);

    /* Gradients */
    --g-accent: linear-gradient(135deg, var(--col-purple), var(--col-cyan));
    --g-text: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);

    /* Space */
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-12: 3rem;
    --sp-16: 4rem;

    /* Radius */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 9999px;

    /* Motion */
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 0.18s;
    --dur-normal: 0.35s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background: var(--col-base);
    color: var(--t-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--r-pill);
}

/* ==========================================================================
   Fluid Aurora Background
   ========================================================================== */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    background: var(--col-base);
    pointer-events: none;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    mix-blend-mode: screen;
    animation: drift var(--dur, 22s) infinite alternate ease-in-out;
}

.aurora-blob-1 {
    width: 55vw;
    height: 55vw;
    top: -15%;
    left: -10%;
    background: var(--col-purple);
    --dur: 22s;
}

.aurora-blob-2 {
    width: 60vw;
    height: 60vw;
    bottom: -20%;
    right: -10%;
    background: var(--col-cyan);
    --dur: 28s;
    animation-delay: -8s;
}

.aurora-blob-3 {
    width: 40vw;
    height: 40vw;
    top: 35%;
    left: 35%;
    background: var(--col-pink);
    opacity: 0.28;
    --dur: 34s;
    animation-delay: -14s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(4%, 8%) scale(1.08);
    }

    100% {
        transform: translate(-4%, -4%) scale(0.94);
    }
}

.bg-noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
.text-gradient {
    background: var(--g-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    background: var(--g-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Glass Component
   ========================================================================== */
.glass-panel {
    background: var(--col-glass);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--col-border);
    border-radius: var(--r-xl);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 8px 32px rgba(0, 0, 0, 0.25);
    transition: border-color var(--dur-normal) var(--ease);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.13);
}

/* ==========================================================================
   App Shell
   ========================================================================== */
.app-wrapper {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 var(--sp-6) var(--sp-16);
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Navigation (Floating Bar)
   ========================================================================== */
.nav-header {
    position: sticky;
    top: var(--sp-4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-6);
    margin-bottom: var(--sp-12);
    border-radius: var(--r-pill);
    /* pill-shaped floating bar */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    color: var(--t-primary);
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}

.nav-link {
    text-decoration: none;
    color: var(--t-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--t-primary);
}

/* Hamburger */
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--col-border);
    color: var(--t-primary);
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
    z-index: 200;
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Main Split Layout
   ========================================================================== */
.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--sp-6);
    align-items: start;
}

/* ==========================================================================
   Input Panel (Left)
   ========================================================================== */
.input-panel {
    padding: var(--sp-8);
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
}

.hero-text h1 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: var(--sp-3);
}

.hero-text p {
    font-size: 0.975rem;
    color: var(--t-secondary);
    line-height: 1.7;
}

/* Form Section Label */
.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--t-muted);
    margin-bottom: var(--sp-2);
}

/* Inputs */
.input-field,
.select-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--col-border);
    border-radius: var(--r-md);
    color: var(--t-primary);
    font-family: inherit;
    font-size: 0.95rem;
    padding: var(--sp-4);
    resize: vertical;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.select-field {
    resize: none;
    cursor: pointer;
}

.input-field:focus,
.select-field:focus {
    outline: none;
    border-color: var(--col-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Genre Grid */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-3);
}

.genre-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Genre Pill Button */
.genre-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--col-border);
    border-radius: var(--r-pill);
    color: var(--t-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    padding: 5px 12px;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    white-space: nowrap;
}

.genre-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--t-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.genre-pill.active {
    background: var(--g-accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

/* Toggle Genre Button */
.genre-toggle-btn {
    background: none;
    border: none;
    color: var(--col-cyan);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    transition: opacity var(--dur-fast) var(--ease);
}

.genre-toggle-btn:hover {
    opacity: 0.7;
}

/* Primary CTA Button */
.btn-generate {
    width: 100%;
    padding: 16px;
    background: var(--g-accent);
    border: none;
    border-radius: var(--r-pill);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.3);
    transition: transform var(--dur-fast) var(--ease),
        box-shadow var(--dur-fast) var(--ease);
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 36px rgba(139, 92, 246, 0.5);
}

.btn-generate:active {
    transform: translateY(0);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Output Panel (Right)
   ========================================================================== */
.output-panel {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}

.output-card {
    padding: var(--sp-6);
}

.output-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-4);
}

.output-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--t-muted);
}

/* Copy button (ghost pill) */
.copy-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--col-border);
    border-radius: var(--r-pill);
    color: var(--t-secondary);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 14px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: all var(--dur-fast) var(--ease);
}

.copy-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--t-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Output Text Areas */
.output-text {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--r-md);
    color: var(--t-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
    padding: var(--sp-4);
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 88px;
    transition: opacity 0.6s var(--ease);
}

#lyrics-output.output-text {
    min-height: 320px;
    font-family: 'Noto Sans JP', sans-serif;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
#toast {
    position: fixed;
    bottom: var(--sp-6);
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(20, 16, 40, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid var(--col-border);
    color: var(--t-primary);
    padding: 10px 24px;
    border-radius: var(--r-pill);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity var(--dur-normal) var(--ease),
        transform var(--dur-normal) var(--ease);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Shared Guide Page Styles
   ========================================================================== */
.guide-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Responsive — Tablet
   ========================================================================== */
@media (max-width: 960px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Responsive — Mobile
   ========================================================================== */
@media (max-width: 680px) {
    .app-wrapper {
        padding: 0 var(--sp-4) var(--sp-12);
    }

    .nav-header {
        border-radius: var(--r-xl);
        padding: var(--sp-3) var(--sp-4);
        top: var(--sp-3);
        margin-bottom: var(--sp-8);
    }

    /* Hide links; shown as fullscreen overlay when .open */
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(3, 0, 20, 0.97);
        backdrop-filter: blur(24px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--sp-6);
        z-index: 150;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--dur-normal) var(--ease);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links.open .nav-link {
        font-size: 1.4rem;
    }

    .input-panel {
        padding: var(--sp-6);
    }

    .output-card {
        padding: var(--sp-4);
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    #lyrics-output.output-text {
        min-height: 220px;
    }
}