/* ===== CSS Variables ===== */
:root {
    /* Colors */
    --bg-primary: #000011;
    --bg-secondary: #0a0a1a;
    --bg-glass: rgba(10, 10, 26, 0.6);
    --bg-gradient-1: #6366f1;
    --bg-gradient-2: #06b6d4;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0c0;
    
    --border-glow: rgba(0, 240, 255, 0.3);
    --glow-cyan: rgba(0, 240, 255, 0.5);
    --glow-purple: rgba(112, 0, 255, 0.5);
    
    --ai-primary: #00f0ff;
    --ai-secondary: #7000ff;
    --ai-accent: #00ff88;
    --ai-success: #00ff88;
    --ai-warning: #ffaa00;
    --ai-danger: #ff0055;
    
    /* Spacing */
    --nav-height: 70px;
    --section-gap: 80px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

/* ===== Background Effects ===== */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: -2;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15), transparent 50%),
                radial-gradient(ellipse at bottom, rgba(6, 182, 212, 0.1), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ===== Sticky Navigation ===== */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(0, 0, 17, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glow);
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 240, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    font-size: 28px;
    -webkit-text-fill-color: initial;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-glass);
    border-color: var(--border-glow);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(112, 0, 255, 0.15));
    border-color: var(--ai-primary);
    color: var(--ai-primary);
    box-shadow: 0 0 20px var(--glow-cyan);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--ai-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ===== Container ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ===== Sections ===== */
.section {
    margin-bottom: var(--section-gap);
    padding: 40px;
    background: var(--bg-glass);
    border-radius: 20px;
    border: 1px solid var(--border-glow);
    backdrop-filter: blur(10px);
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(112, 0, 255, 0.1));
    border: 1px solid var(--border-glow);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ai-primary);
    margin-bottom: 16px;
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 32px;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 24px;
}

.header-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== Upload Section ===== */
.upload-section {
    margin-top: 32px;
}

/* Input Mode Switch */
.input-mode-switch {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.mode-btn {
    padding: 12px 24px;
    background: var(--bg-glass);
    border: 2px solid var(--border-glow);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.mode-btn:hover {
    border-color: var(--ai-primary);
    color: var(--text-primary);
}

.mode-btn.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(112, 0, 255, 0.15));
    border-color: var(--ai-primary);
    color: var(--ai-primary);
    box-shadow: 0 0 20px var(--glow-cyan);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-glow);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--ai-primary);
    background: rgba(0, 240, 255, 0.05);
    box-shadow: 0 0 40px var(--glow-cyan);
}

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

.upload-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.upload-hint {
    font-size: 14px;
    color: var(--text-secondary);
}

.file-input {
    display: none;
}

.file-name {
    margin-top: 16px;
    padding: 12px 20px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--ai-success);
    border-radius: 10px;
    color: var(--ai-success);
    font-weight: 600;
    display: none;
}

.file-name.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Textarea */
.resume-textarea {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 17, 0.8);
    border: 2px solid var(--border-glow);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.resume-textarea:focus {
    outline: none;
    border-color: var(--ai-primary);
    box-shadow: 
        0 0 0 4px rgba(0, 240, 255, 0.2),
        0 0 40px var(--glow-cyan);
}

.resume-textarea::placeholder {
    color: rgba(160, 160, 192, 0.4);
}

/* Character Counter */
.char-counter {
    text-align: right;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}

.char-counter.valid {
    color: var(--ai-success);
}

.char-counter.invalid {
    color: var(--ai-danger);
}

/* Input Group */
.input-group {
    margin-top: 24px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.optional-badge {
    background: rgba(160, 160, 192, 0.2);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--text-secondary);
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 17, 0.8);
    border: 2px solid var(--border-glow);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--ai-primary);
    box-shadow: 0 0 0 4px rgba(0, 240, 255, 0.2);
}

.input-hint {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Buttons */
.btn-primary {
    width: 100%;
    margin-top: 32px;
    padding: 18px 32px;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 240, 255, 0.5);
}

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

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 60px 40px;
    margin-top: 32px;
    background: var(--bg-glass);
    border-radius: 16px;
    border: 1px solid var(--border-glow);
}

.loading.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid var(--border-glow);
    border-top-color: var(--ai-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ai-primary);
}

.loading-subtext {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Results */
.results {
    display: none;
    margin-top: 32px;
}

.results.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.result-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.result-icon {
    font-size: 32px;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Score Display */
.score-display {
    text-align: center;
    padding: 20px;
}

.score-circle {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    position: relative;
}

.score-circle svg {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 20px var(--glow-cyan));
}

.score-circle circle {
    fill: none;
    stroke-width: 12;
}

.score-circle .bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.score-circle .progress {
    stroke: url(#scoreGradient);
    stroke-linecap: round;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 15px var(--glow-cyan));
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.score-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.roast-text {
    font-size: 16px;
    font-style: italic;
    color: var(--text-secondary);
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border-left: 4px solid var(--ai-primary);
}

/* Scores Grid */
.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.score-item {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.score-item.total {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(112, 0, 255, 0.1));
    border: 1px solid var(--ai-primary);
}

.score-item-value {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.score-item-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.score-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Lists */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-list li {
    padding: 12px 0;
    padding-left: 28px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.item-list.success li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--ai-success);
    font-weight: 700;
}

.item-list.error li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--ai-danger);
    font-weight: 700;
}

/* Advice Card */
.advice-card {
    padding: 24px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(112, 0, 255, 0.05));
    border-radius: 14px;
    border-left: 4px solid var(--ai-primary);
}

.advice-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--ai-primary);
}

.advice-card p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Audio Section */
.audio-section {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.audio-player {
    width: 100%;
    margin-top: 12px;
}

.audio-text {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== Cover Letter & Match Score Sections ===== */
.cl-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cl-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cl-input-group.full-width {
    grid-column: 1 / -1;
}

.cl-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cl-mode-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.cl-mode-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.cl-mode-btn:hover {
    border-color: var(--ai-primary);
    color: var(--text-primary);
}

.cl-mode-btn.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--ai-primary);
    color: var(--ai-primary);
    box-shadow: 0 0 10px var(--glow-cyan);
}

.cl-file-label {
    display: block;
    padding: 12px;
    background: var(--bg-glass);
    border: 1px dashed var(--border-glow);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.cl-file-label:hover {
    border-color: var(--ai-primary);
    color: var(--text-primary);
    border-style: solid;
}

/* Result Box */
.cl-result-box {
    margin-top: 30px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(112, 0, 255, 0.05));
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

.cl-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-glow);
    font-weight: 600;
    color: var(--text-primary);
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--ai-primary);
    color: var(--ai-primary);
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.copy-btn:hover {
    background: var(--ai-primary);
    color: white;
}

.cl-text-content {
    padding: 24px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
}

/* Audio Container */
.cl-audio-container {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-glow);
}

.cl-audio-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--ai-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cl-audio-player {
    width: 100%;
    height: 40px;
    border-radius: 8px;
    outline: none;
}

/* Match Score Specific */
.ms-result-content {
    padding: 30px 24px;
}

.ms-score-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    position: relative;
}

.ms-score-circle svg {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 20px var(--glow-cyan));
}

.ms-score-circle circle {
    fill: none;
    stroke-width: 12;
}

.ms-score-circle .bg {
    stroke: rgba(255, 255, 255, 0.05);
}

.ms-score-circle .progress-match {
    stroke-linecap: round;
    filter: drop-shadow(0 0 15px var(--glow-cyan));
}

.ms-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 42px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ai-primary), var(--ai-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.ms-verdict {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.ms-verdict.high {
    color: var(--ai-success);
    border: 2px solid var(--ai-success);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

.ms-verdict.medium {
    color: var(--ai-warning);
    border: 2px solid var(--ai-warning);
    box-shadow: 0 0 30px rgba(255, 170, 0, 0.3);
}

.ms-verdict.low {
    color: var(--ai-danger);
    border: 2px solid var(--ai-danger);
    box-shadow: 0 0 30px rgba(255, 0, 85, 0.3);
}

.ms-salary {
    text-align: center;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    padding: 12px;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--ai-primary);
}

.ms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.ms-column {
    padding: 20px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
}

.ms-column.pros {
    border-left: 4px solid var(--ai-success);
}

.ms-column.cons {
    border-left: 4px solid var(--ai-danger);
}

.ms-column h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.ms-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ms-column li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ms-column.pros li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--ai-success);
    font-weight: 700;
}

.ms-column.cons li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: var(--ai-danger);
    font-weight: 700;
}

.ms-recommendations {
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(112, 0, 255, 0.05));
    border: 1px solid var(--border-glow);
}

.ms-recommendations h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--ai-primary);
}

.ms-recommendations ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ms-recommendations li {
    padding: 10px 0;
    padding-left: 25px;
    position: relative;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
}

.ms-recommendations li::before {
    content: '💡';
    position: absolute;
    left: 0;
}
.ms-mode-btn {
    flex: 1;
    padding: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.ms-mode-btn:hover {
    border-color: var(--ai-primary);
    color: var(--text-primary);
}

.ms-mode-btn.active {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--ai-primary);
    color: var(--ai-primary);
    box-shadow: 0 0 10px var(--glow-cyan);
}
/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 40px 24px;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-glow);
    margin-top: 60px;
}

.footer p {
    margin: 4px 0;
}

.footer-hint {
    font-size: 13px;
    opacity: 0.7;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(0, 0, 17, 0.98);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-glow);
        gap: 4px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-link {
        padding: 12px;
        text-align: center;
    }
    
    .header-title {
        font-size: 32px;
    }
    
    .subtitle {
        font-size: 16px;
    }
    
    .section {
        padding: 24px 20px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .cl-form-grid,
    .ms-grid {
        grid-template-columns: 1fr;
    }
    
    .input-mode-switch {
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .score-value {
        font-size: 36px;
    }
    
    .ms-score-value {
        font-size: 32px;
    }
    
    .ms-verdict {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 16px;
    }
    
    .header-title {
        font-size: 28px;
    }
    
    .upload-zone {
        padding: 40px 20px;
    }
    
    .result-card {
        padding: 20px;
    }
}
/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--border-glow);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 320px;
    max-width: 400px;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.toast.hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

/* Типы уведомлений */
.toast.error {
    border-color: var(--ai-danger);
    box-shadow: 0 10px 40px rgba(255, 0, 85, 0.3);
}

.toast.error::before {
    background: var(--ai-danger);
    box-shadow: 0 0 20px var(--ai-danger);
}

.toast.success {
    border-color: var(--ai-success);
    box-shadow: 0 10px 40px rgba(0, 255, 136, 0.3);
}

.toast.success::before {
    background: var(--ai-success);
    box-shadow: 0 0 20px var(--ai-success);
}

.toast.warning {
    border-color: var(--ai-warning);
    box-shadow: 0 10px 40px rgba(255, 170, 0, 0.3);
}

.toast.warning::before {
    background: var(--ai-warning);
    box-shadow: 0 0 20px var(--ai-warning);
}

.toast.info {
    border-color: var(--ai-primary);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.3);
}

.toast.info::before {
    background: var(--ai-primary);
    box-shadow: 0 0 20px var(--ai-primary);
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.toast.error .toast-icon { color: var(--ai-danger); }
.toast.success .toast-icon { color: var(--ai-success); }
.toast.warning .toast-icon { color: var(--ai-warning); }
.toast.info .toast-icon { color: var(--ai-primary); }

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.toast.error .toast-title { color: var(--ai-danger); }
.toast.success .toast-title { color: var(--ai-success); }
.toast.warning .toast-title { color: var(--ai-warning); }
.toast.info .toast-title { color: var(--ai-primary); }

.toast-message {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    word-wrap: break-word;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    color: var(--text-primary);
}

/* Прогресс-бар */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.5;
    animation: toastProgress linear forwards;
}

.toast.error .toast-progress { background: var(--ai-danger); }
.toast.success .toast-progress { background: var(--ai-success); }
.toast.warning .toast-progress { background: var(--ai-warning); }
.toast.info .toast-progress { background: var(--ai-primary); }

/* Анимации */
@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
        max-height: 200px;
        margin-bottom: 0;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
        max-height: 0;
        margin-bottom: -12px;
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Адаптивность */
@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}