:root {
    --primary: #6C5CE7;      /* Open Source Purple */
    --primary-hover: #5b4bc4;
    --secondary: #636E72;    /* Slate Gray */
    --accent: #00CEC9;       /* OK Teal */
    --bg-base: #0F0F1A;      /* Very dark blue/black */
    --bg-card: #1A1A2E;      /* Card background */
    --bg-card-hover: #22223a;
    --border: rgba(108, 92, 231, 0.2);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    
    --green: #2ecc71;
    --red: #e74c3c;
    --blue: #3498db;
    
    --radius: 12px;
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hidden { display: none !important; }
.mb-4 { margin-bottom: 1rem; }
.max-w-3xl { max-width: 48rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.app-header {
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 16px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

nav { display: flex; gap: 8px; }

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.05); }
.nav-btn.active { color: white; background: var(--border); }

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid rgba(255,255,255,0.1); }
.btn-secondary:hover:not(:disabled) { background: rgba(255,255,255,0.1); }

/* Main layout */
main { padding: 40px 24px; flex: 1; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

/* Wizard */
.wizard-container {
    max-width: 800px;
    margin: 0 auto;
}

.progress-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    margin-bottom: 40px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.q-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.q-desc { color: var(--text-muted); margin-bottom: 32px; font-size: 1.1rem; }

.answers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 40px;
}

.answer-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    color: white;
}
.answer-card:hover {
    background: rgba(108, 92, 231, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}
.answer-card h4 { font-size: 1.1rem; margin-bottom: 4px; }
.answer-card p { font-size: 0.9rem; color: var(--text-muted); }

.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
}
.step-indicator { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Recommendation Pane */
.badge { display: inline-block; padding: 6px 12px; background: rgba(0, 206, 201, 0.1); color: var(--accent); border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 16px; }
.result-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; color: white; }
.result-desc { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 32px; max-width: 600px; }

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.perm-card { background: rgba(0,0,0,0.2); border-radius: 8px; padding: 20px; }
.perm-card h4 { margin-bottom: 16px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.perm-card ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.perm-card li { font-size: 0.9rem; color: #cbd5e1; display: flex; align-items: flex-start; gap: 8px; }
.perm-card li::before { content: "-"; color: var(--text-muted); }

.action-bar { display: flex; gap: 16px; }

/* Explore View */
.split-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.license-sidebar h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; color: var(--text-muted); }
.license-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.license-list li {
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}
.license-list li:hover { background: rgba(255,255,255,0.05); color: white; }
.license-list li.active { background: rgba(108, 92, 231, 0.15); color: var(--primary); font-weight: 600; }

.license-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.license-header h1 { font-size: 2rem; }
.spdx-badge { background: rgba(255,255,255,0.1); padding: 4px 10px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.85rem; }

.metadata-grid { display: flex; gap: 32px; margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.meta-item { display: flex; flex-direction: column; gap: 8px; }
.meta-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.meta-val { font-weight: 500; }
.meta-code { font-family: var(--font-mono); background: rgba(0,0,0,0.3); padding: 4px 8px; border-radius: 4px; font-size: 0.9rem; color: var(--accent); }

.generator-box h3 { margin-bottom: 16px; }
.gen-inputs { display: flex; gap: 12px; margin-bottom: 16px; }
.gen-inputs input {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-family: var(--font-sans);
    flex: 1;
}
.gen-inputs input:focus { outline: none; border-color: var(--primary); }
.gen-inputs input#gen-year { flex: 0 0 100px; }

.code-wrap { position: relative; background: #000; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); padding: 24px; max-height: 400px; overflow-y: auto; }
.copy-btn { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.1); border: none; color: white; padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; font-weight: 500; transition: background 0.2s;}
.copy-btn:hover { background: rgba(255,255,255,0.2); }
pre code { font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.5; color: #e2e8f0; white-space: pre-wrap; }

.matrix-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); }
.compat-box { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.compat-tag { padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); }

/* FAQ View */
.faq-list { display: flex; flex-direction: column; gap: 24px; }
.faq-item { padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.faq-item h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--primary); }
.faq-item p { color: #cbd5e1; }

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #00b894;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    pointer-events: none;
    z-index: 100;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
    .split-layout { grid-template-columns: 1fr; }
    .gen-inputs { flex-direction: column; }
    .gen-inputs input#gen-year { flex: auto; }
}
