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

:root {
    --bg: #1a1a2e;
    --surface: #16213e;
    --surface-light: #1f2f50;
    --accent: #e94560;
    --accent-soft: #ff6b6b;
    --text: #eee;
    --text-dim: #8892b0;
    --border: #2a3a5e;
    --success: #4ecdc4;
    --warning: #f39c12;
    --danger: #e74c3c;
    --green: #2ecc71;
    --yellow: #f1c40f;
    --red: #e74c3c;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    min-height: 100vh;
}

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
.header {
    padding: 16px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 36px;
}

.logo-text h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-soft);
}

.subtitle {
    font-size: 13px;
    color: var(--text-dim);
}

.header-nav {
    display: flex;
    gap: 12px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--surface-light);
}

/* Content */
.content {
    flex: 1;
    padding: 20px;
}

/* Disclaimer banner */
.disclaimer-banner {
    background: rgba(233, 69, 96, 0.15);
    border: 1px solid rgba(233, 69, 96, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--accent-soft);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Upload zone */
.upload-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.upload-zone {
    padding: 48px 24px;
    text-align: center;
    border: 2px dashed var(--border);
    border-radius: 14px;
    margin: 16px;
    transition: border-color 0.3s, background 0.3s;
    cursor: pointer;
}

.upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.upload-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    font-family: var(--font);
}

.upload-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.upload-filename {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

/* Features grid */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
}

.feature-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.feature-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
}

.limit-info {
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
}

/* Progress */
.progress-section {
    display: flex;
    justify-content: center;
    padding-top: 60px;
}

.progress-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.progress-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.progress-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-soft);
    margin-bottom: 20px;
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 1s ease;
    width: 0%;
}

.progress-status {
    font-size: 13px;
    color: var(--text-dim);
}

/* Report */
.report-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

.report-type {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-soft);
}

.report-score-wrap {
    text-align: center;
}

.report-score {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.report-score.score-good { color: var(--green); }
.report-score.score-medium { color: var(--yellow); }
.report-score.score-bad { color: var(--red); }

.report-score-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 4px;
}

.report-parties {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-dim);
}

.report-parties strong {
    color: var(--text);
}

.report-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
}

/* Report items */
.report-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.report-item {
    background: var(--surface);
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid;
}

.report-item.level-red {
    border-left-color: var(--red);
    background: rgba(231, 76, 60, 0.08);
}

.report-item.level-yellow {
    border-left-color: var(--yellow);
    background: rgba(241, 196, 15, 0.06);
}

.report-item.level-green {
    border-left-color: var(--green);
    background: rgba(46, 204, 113, 0.06);
}

.item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.item-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.item-badge.level-red {
    background: var(--red);
    color: white;
}

.item-badge.level-yellow {
    background: var(--yellow);
    color: #1a1a2e;
}

.item-badge.level-green {
    background: var(--green);
    color: white;
}

.item-clause {
    font-weight: 600;
    font-size: 14px;
}

.item-issue {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.item-recommendation {
    font-size: 13px;
    color: var(--success);
    line-height: 1.5;
}

.item-recommendation::before {
    content: "Rекомендация: ";
    font-weight: 600;
}

.item-law {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.item-note {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Missing items */
.report-missing {
    margin-bottom: 24px;
}

.report-missing h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 12px;
}

.missing-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-left: 4px solid var(--warning);
}

.missing-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.missing-rec {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.4;
}

.missing-law {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* Report disclaimer */
.report-disclaimer {
    background: rgba(233, 69, 96, 0.1);
    border: 1px solid rgba(233, 69, 96, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 12px;
    color: var(--accent-soft);
    line-height: 1.5;
    margin-bottom: 24px;
}

.new-check-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 40px;
}

/* Error */
.error-section {
    display: flex;
    justify-content: center;
    padding-top: 60px;
}

.error-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 12px;
}

.error-message {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Limit banner */
.limit-banner {
    padding: 12px 20px;
    background: var(--warning);
    color: #1a1a2e;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 16px;
}

/* Mobile */
@media (max-width: 600px) {
    .header {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .content {
        padding: 12px;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .feature {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 14px 16px;
    }

    .feature-icon {
        font-size: 24px;
        margin-bottom: 0;
    }

    .upload-zone {
        padding: 32px 16px;
        margin: 12px;
    }

    .report-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .header-nav {
        gap: 4px;
    }

    .nav-link {
        font-size: 12px;
        padding: 4px 8px;
    }
}
