:root {
    --background: 0 0% 100%;
    --foreground: 0 0% 8%;
    --border: 0 0% 92%;
    --card: 0 0% 98%;
    --card-foreground: 0 0% 10%;
    --muted: 210 6% 88%;
    --muted-foreground: 210 4% 35%;
    --primary: 210 15% 28%;
    --primary-foreground: 210 10% 98%;
    --accent: 210 8% 90%;
    --accent-foreground: 210 6% 18%;
    --ring: 210 15% 28%;
    --input: 0 0% 75%;
    --destructive: 0 72% 32%;
    --radius-sm: 0.1875rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5625rem;
}

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

body {
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    min-height: 100vh;
    font-size: 0.9375rem;
    line-height: 1.625;
    display: flex;
    flex-direction: column;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: hsl(var(--background) / 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid hsl(var(--border) / 0.4);
}

.nav-inner {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-img {
    height: 32px;
    width: auto;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.logo-text {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-size: 1.125rem;
    letter-spacing: -0.025em;
    color: hsl(var(--foreground));
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: hsl(var(--foreground) / 0.05);
    color: hsl(var(--foreground));
}

.nav-link.active {
    background: hsl(var(--foreground) / 0.05);
    font-weight: 500;
    color: hsl(var(--foreground));
}

.container {
    max-width: 48rem;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
    flex: 1;
}

header {
    text-align: center;
    margin-bottom: 5rem;
}

header h1 {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-size: 3rem;
    font-weight: 400;
    letter-spacing: -0.025em;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.tagline {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-style: italic;
    color: hsl(var(--muted-foreground));
    font-size: 1rem;
    letter-spacing: normal;
}

.input-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 1px solid hsl(var(--border) / 0.5);
}

.tab {
    flex: 1;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: hsl(var(--muted-foreground));
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    border-bottom: 2px solid transparent;
}

.tab:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--foreground) / 0.02);
}

.tab.active {
    color: hsl(var(--foreground));
    border-bottom-color: hsl(var(--foreground));
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.upload-area {
    border: 1px dashed hsl(var(--border));
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 3.5rem 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: hsl(var(--card) / 0.3);
}

.upload-area:hover, .upload-area.dragover {
    background: hsl(var(--foreground) / 0.02);
    border-color: hsl(var(--muted-foreground) / 0.3);
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.upload-area h2 {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
    line-height: 1.2;
}

.upload-area p {
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
}

.formats {
    margin-top: 1rem;
    font-size: 0.6875rem !important;
    color: hsl(var(--muted-foreground) / 0.6) !important;
    letter-spacing: 0.05em;
}

.hidden {
    display: none !important;
}

.url-panel {
    border: 1px dashed hsl(var(--border));
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    background: hsl(var(--card) / 0.3);
}

.url-panel h2 {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
    line-height: 1.2;
}

.url-panel > p {
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
}

.url-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.url-input-row {
    display: flex;
    gap: 0.75rem;
    max-width: 480px;
    margin: 0 auto;
}

.url-input-row input {
    flex: 1;
    padding: 0.625rem 1rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--input) / 0.4);
    border-radius: var(--radius-md);
    color: hsl(var(--foreground));
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.url-input-row input:focus {
    border-color: hsl(var(--primary));
    outline: 2px solid hsl(var(--ring) / 0.2);
    outline-offset: 1px;
}

.url-input-row input::placeholder {
    color: hsl(var(--muted-foreground) / 0.5);
}

.btn-analyze {
    padding: 0.625rem 1.25rem;
    background: hsl(var(--foreground));
    border: 1px solid hsl(var(--foreground));
    border-radius: var(--radius-md);
    color: hsl(var(--background));
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-analyze:hover {
    background: hsl(var(--foreground) / 0.85);
}

.player-section {
    margin-bottom: 1.5rem;
}

.player-section audio {
    width: 100%;
    border-radius: var(--radius-md);
    outline: none;
}

.loading-card {
    text-align: center;
    padding: 3.5rem 2.5rem;
    background: hsl(var(--card) / 0.3);
    border-radius: var(--radius-lg);
    border: 1px solid hsl(var(--border) / 0.5);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 2px solid hsl(var(--border));
    border-top-color: hsl(var(--foreground));
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

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

.loading-card h2 {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--foreground));
    line-height: 1.2;
}

.loading-step {
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
    margin-bottom: 2rem;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: hsl(var(--border));
    font-size: 0.75rem;
    transition: color 0.2s;
}

.step.active {
    color: hsl(38 50% 42%);
}

.step.done {
    color: hsl(152 40% 38%);
}

.step-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: hsl(var(--border));
    transition: background 0.2s;
}

.step.active .step-dot {
    background: hsl(38 50% 42%);
    animation: pulse 1.5s ease infinite;
}

.step.done .step-dot {
    background: hsl(152 40% 38%);
}

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

.verdict-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 5rem;
    border: 1px solid hsl(var(--border) / 0.5);
    background: hsl(var(--card) / 0.3);
}

.verdict-card.glassfolk {
    border-color: hsl(var(--border) / 0.5);
}

.verdict-card.adjacent {
    border-color: hsl(var(--border) / 0.5);
}

.verdict-card.not-glassfolk {
    border-color: hsl(var(--border) / 0.5);
}

.verdict-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--muted-foreground) / 0.4);
}

.verdict-song {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-size: 1rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
    font-style: italic;
    word-break: break-word;
}

.verdict-card h2 {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-size: 1.875rem;
    font-weight: 400;
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
    line-height: 1.2;
}

.confidence {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.summary {
    color: hsl(var(--foreground) / 0.8);
    font-size: 0.875rem;
    line-height: 1.625;
    max-width: 32rem;
    margin: 0 auto;
}

.section-label {
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.dimensions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 5rem;
}

.dimension-card {
    background: hsl(var(--card) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

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

.dimension-name {
    font-weight: 500;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.dimension-score {
    font-weight: 500;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
}

.score-high { color: hsl(152 40% 38%); }
.score-mid { color: hsl(38 50% 42%); }
.score-low { color: hsl(0 30% 45%); }

.score-bar-bg {
    height: 3px;
    background: hsl(var(--border));
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.625rem;
}

.score-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
    background: hsl(var(--foreground) / 0.25);
}

.score-bar-fill.high { background: hsl(152 40% 38% / 0.6); }
.score-bar-fill.mid { background: hsl(38 50% 42% / 0.5); }
.score-bar-fill.low { background: hsl(0 30% 45% / 0.4); }

.dimension-weight {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground) / 0.6);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.dimension-reasoning {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.625;
}

.mirror-test-section {
    margin-bottom: 5rem;
}

.mirror-test-text {
    background: hsl(var(--card) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    font-size: 0.8125rem;
    color: hsl(var(--foreground) / 0.8);
    line-height: 1.625;
}

.mirror-result {
    font-weight: 500;
    display: inline-block;
    margin-right: 0.375rem;
    color: hsl(var(--foreground));
}

.mirror-result.pass {
    color: hsl(152 40% 38%);
}

.mirror-result.fail {
    color: hsl(0 30% 45%);
}

.traits-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.traits-title-for { color: hsl(152 40% 38%); }
.traits-title-against { color: hsl(0 30% 45%); }

.traits-list {
    list-style: none;
    background: hsl(var(--card) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.traits-list li {
    padding: 0.25rem 0;
    font-size: 0.8125rem;
    color: hsl(var(--foreground) / 0.8);
    line-height: 1.5;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.traits-for li::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1px;
    background: hsl(var(--border));
    margin-top: 0.625rem;
    flex-shrink: 0;
}

.traits-against li::before {
    content: "";
    display: inline-block;
    width: 1rem;
    height: 1px;
    background: hsl(var(--border));
    margin-top: 0.625rem;
    flex-shrink: 0;
}

.coaching-tips {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 5rem;
}

.coaching-card {
    background: hsl(var(--card) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.coaching-card .coaching-area {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 1rem;
    color: hsl(var(--foreground));
    margin-bottom: 0.75rem;
}

.coaching-card .coaching-issue {
    font-size: 0.8125rem;
    color: hsl(var(--foreground) / 0.7);
    margin-bottom: 0.5rem;
    line-height: 1.625;
}

.coaching-card .coaching-suggestion {
    font-size: 0.8125rem;
    color: hsl(var(--foreground) / 0.8);
    margin-bottom: 0.5rem;
    line-height: 1.625;
}

.coaching-card .coaching-example {
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.625;
    font-style: italic;
}

.coaching-label {
    font-weight: 500;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: inline-block;
    margin-right: 0.25rem;
    color: hsl(var(--muted-foreground) / 0.6);
}

.audio-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 5rem;
}

.audio-stat {
    background: hsl(var(--card) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
}

.audio-stat .stat-value {
    font-family: 'Playfair Display', 'Libre Baskerville', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: hsl(var(--foreground));
    margin-bottom: 0.25rem;
}

.audio-stat .stat-label {
    font-size: 0.6875rem;
    color: hsl(var(--muted-foreground) / 0.6);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
}

.transcription-section {
    margin-bottom: 5rem;
}

.transcription-text {
    background: hsl(var(--card) / 0.3);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    font-size: 0.8125rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.625;
    font-style: italic;
    max-height: 200px;
    overflow-y: auto;
}

.btn-another {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-md);
    color: hsl(var(--muted-foreground));
    font-family: 'Inter', 'Open Sans', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
}

.btn-another:hover {
    background: hsl(var(--foreground) / 0.05);
    color: hsl(var(--foreground));
}

.site-footer {
    border-top: 1px solid hsl(var(--border) / 0.4);
}

.footer-inner {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.footer-brand {
    font-size: 0.8125rem;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
}

.footer-credit {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground) / 0.6);
}

.footer-credit a {
    color: hsl(var(--muted-foreground) / 0.6);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.2s;
}

.footer-credit a:hover {
    opacity: 0.7;
}

@media (max-width: 640px) {
    .container { padding: 2rem 1rem 3rem; }
    header { margin-bottom: 3rem; }
    header h1 { font-size: 2.25rem; }
    .upload-area { padding: 2.5rem 1.25rem; }
    .url-panel { padding: 2rem 1.25rem; }
    .url-input-row { flex-direction: column; }
    .traits-row { grid-template-columns: 1fr; }
    .progress-steps { gap: 1rem; flex-wrap: wrap; justify-content: center; }
    .audio-info { grid-template-columns: 1fr 1fr; }
    .dimensions-grid, .coaching-tips, .traits-row,
    .mirror-test-section, .transcription-section,
    .audio-info { margin-bottom: 3rem; }
    .verdict-card { margin-bottom: 3rem; }
    .logo-text { display: none; }
    .nav-links { gap: 0; overflow-x: auto; }
    .nav-link { padding: 0.375rem 0.5rem; font-size: 0.75rem; }
}
