:root {
    --bg-main: #f4f6f8;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1a202c;
    --text-secondary: #718096;
    --accent: #4a4a8a;
    --accent-hover: #5a5a9e;
    --accent-glow: rgba(74, 74, 138, 0.15);
    --success: #2d6a4f;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at top right, rgba(74,74,138,0.05), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(74,74,138,0.03), transparent 40%);
}

.app-container {
    width: 100%;
    max-width: 600px;
    padding: 40px;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #a8a8f0, var(--accent));
    border-radius: 4px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.app-header h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
}

.app-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}

.card-header {
    margin-bottom: 24px;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.card-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.settings-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
    outline: none;
}

.premium-input:focus {
    background: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74,74,138,0.1);
}

.scenario-cutaway {
    margin-top: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.cutaway-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.cutaway-row {
    font-size: 13px;
    margin-bottom: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.cutaway-row:last-child {
    margin-bottom: 0;
}

.cutaway-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.cutaway-value {
    color: var(--text-primary);
}

.keyword-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.k-tag {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-primary);
    font-family: Consolas, monospace;
}

.tabs-container {
    display: flex;
    background: #edf2f7;
    border-radius: 6px;
    padding: 4px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: #ffffff;
    color: var(--accent);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.slider-group {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 12px 14px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.slider-val {
    font-weight: 700;
    font-family: Consolas, monospace;
}

.dist-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    outline: none;
}

.dist-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-secondary);
    cursor: pointer;
}

.signal-slider::-webkit-slider-thumb {
    background: var(--accent);
}

.legalese-bullets {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dotted var(--border-color);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.legalese-bullets ul {
    margin-left: 18px;
    margin-bottom: 0;
}

.legalese-bullets li {
    margin-bottom: 4px;
}

.premium-btn {
    width: 100%;
    margin-top: 12px;
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
    font-family: inherit;
}

.premium-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}

.premium-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.premium-btn:active {
    transform: translateY(1px);
}

.status-card {
    opacity: 0.5;
    pointer-events: none;
    transition: all 0.3s;
}

.status-card.active {
    opacity: 1;
    pointer-events: all;
}

.progress-container {
    margin-top: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #edf2f7;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-fill.done {
    background: var(--success);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}
