/**
 * ============================================
 * SENTINEL ANALYTICS - Premium Cybersecurity Platform
 * Design System: Dark Luxury / Espresso Brown & Copper
 * ============================================
 */

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

:root {
    /* Core Color Palette - Espresso & Copper */
    --bg-primary: #0d0a08;
    --bg-secondary: #14100e;
    --bg-tertiary: #1c1613;
    --bg-elevated: #241c18;
    
    --accent-bronze: #cd7f32;
    --accent-copper: #b87333;
    --accent-gold: #d4af37;
    --accent-soft: rgba(205, 127, 50, 0.15);
    
    --text-primary: #e8e2dc;
    --text-secondary: #b3a599;
    --text-muted: #7a6f66;
    
    --border-subtle: rgba(205, 127, 50, 0.15);
    --border-strong: rgba(205, 127, 50, 0.35);
    
    /* Shadows & Depth */
    --shadow-soft: 0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.65);
    --shadow-accent: 0 0 60px rgba(205, 127, 50, 0.12);
    
    /* Typography */
    --font-display: 'Plus Jakarta Sans', 'Inter', 'Geist', 'IBM Plex Sans', -apple-system, sans-serif;
    --font-body: 'Inter', 'Geist', 'IBM Plex Sans', -apple-system, sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ---------------------------
   Background: Subtle Cybersecurity Visualization
   --------------------------- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(205, 127, 50, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(184, 115, 51, 0.025) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.02) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Floating particles - subtle */
.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(205, 127, 50, 0.15);
    border-radius: 50%;
    animation: floatParticle 25s infinite linear;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ---------------------------
   Layout Container
   --------------------------- */
.container {
    position: relative;
    z-index: 100;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

/* ---------------------------
   Hero Section
   --------------------------- */
.hero {
    text-align: center;
    margin-bottom: 6rem;
    padding-top: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: var(--accent-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    margin-bottom: 2rem;
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 50%, var(--accent-copper) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    font-weight: 400;
}

/* ---------------------------
   Workflow Cards
   --------------------------- */
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 6rem;
}

.workflow-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.workflow-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-bronze), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.workflow-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-medium), var(--shadow-accent);
}

.workflow-card:hover::before {
    opacity: 1;
}

.workflow-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-soft), rgba(184, 115, 51, 0.08));
    border: 1px solid var(--border-subtle);
    color: var(--accent-gold);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
}

.workflow-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.workflow-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.workflow-card p {
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.7;
}

/* ---------------------------
   Form Sections
   --------------------------- */
.form-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 28px;
    padding: 3.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-soft);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.section-number {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
}

.form-section-title h2 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed rgba(205, 127, 50, 0.35);
    border-radius: 20px;
    padding: 3.5rem 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    transition: all 0.35s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--accent-bronze);
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-elevated));
    box-shadow: 0 0 40px rgba(205, 127, 50, 0.08);
}

.file-upload-area.dragover {
    border-color: var(--accent-gold);
    background: rgba(205, 127, 50, 0.06);
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
}

.upload-text {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.file-input {
    display: none;
}

/* Target Column */
.form-group {
    margin-top: 2rem;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-input {
    width: 100%;
    padding: 1.1rem 1.4rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-bronze);
    box-shadow: 0 0 0 4px rgba(205, 127, 50, 0.12);
}

/* Algorithm Cards */
.algorithms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.algorithm-card {
    position: relative;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 1.75rem;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.algorithm-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-subtle);
}

.algorithm-card.selected {
    border-color: var(--accent-bronze);
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.05), var(--bg-tertiary));
    box-shadow: 0 0 40px rgba(205, 127, 50, 0.12);
}

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

.algorithm-icon {
    font-size: 2rem;
}

.algorithm-check {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.algorithm-card.selected .algorithm-check {
    background: var(--accent-bronze);
    border-color: var(--accent-bronze);
    color: white;
}

.algorithm-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.algorithm-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.algorithm-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meta-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-speed {
    background: rgba(100, 200, 100, 0.12);
    color: #85d996;
}

.badge-accuracy {
    background: rgba(205, 127, 50, 0.15);
    color: var(--accent-gold);
}

/* Toggle Switches */
.toggles-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

.toggle-item:hover {
    border-color: rgba(205, 127, 50, 0.25);
}

.toggle-label-area {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.toggle-icon {
    font-size: 1.5rem;
}

.toggle-text h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toggle-text p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* Modern Toggle Switch */
.toggle-switch {
    position: relative;
    width: 58px;
    height: 32px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 32px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent-bronze), var(--accent-copper));
    border-color: transparent;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
    background-color: white;
}

/* ---------------------------
   Centerpiece CTA Button
   --------------------------- */
.cta-wrapper {
    text-align: center;
    margin-top: 4rem;
}

.btn-analyze {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.75rem 4.5rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #0d0a08;
    background: linear-gradient(135deg, var(--accent-bronze), var(--accent-gold));
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 12px 48px rgba(205, 127, 50, 0.35);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.btn-analyze:hover:not(:disabled) {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(205, 127, 50, 0.45);
}

.btn-analyze:active:not(:disabled) {
    transform: translateY(-2px);
}

.btn-analyze:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    filter: grayscale(0.3);
}

/* ---------------------------
   Progress Screen (Redesigned)
   --------------------------- */
.progress-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 10, 8, 0.985);
    display: none;
    padding: 3rem;
    overflow-y: auto;
    z-index: 10000;
}

.progress-screen.active {
    display: block;
}

.progress-container {
    max-width: 1500px;
    margin: 0 auto;
}

.progress-header {
    text-align: center;
    margin-bottom: 3rem;
}

.progress-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.progress-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

/* Left Column */
.progress-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Pipeline */
.pipeline-panel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2rem;
}

.pipeline-panel h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.pipeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pipeline-item:last-child {
    border-bottom: none;
}

.pipeline-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.pipeline-item.active .pipeline-status-icon {
    background: rgba(205, 127, 50, 0.18);
    color: var(--accent-gold);
}

.pipeline-item.completed .pipeline-status-icon {
    background: rgba(100, 200, 100, 0.15);
    color: #85d996;
}

.pipeline-item-text {
    flex: 1;
}

.pipeline-item-text span {
    color: var(--text-muted);
    font-weight: 500;
}

.pipeline-item.active .pipeline-item-text span {
    color: var(--text-primary);
}

.pipeline-item.completed .pipeline-item-text span {
    color: var(--text-secondary);
}

/* Live Log */
.log-panel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2rem;
    flex: 1;
}

.log-panel h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.log-container {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    padding: 1.5rem;
    height: 400px;
    overflow-y: auto;
    font-family: 'IBM Plex Mono', 'SF Mono', monospace;
}

.log-line {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.log-line.success {
    color: #85d996;
}

.log-line.info {
    color: #8fc8ff;
}

.log-timestamp {
    color: var(--text-muted);
    margin-right: 0.8rem;
    font-size: 0.85rem;
}

/* Results Grid */
.results-panel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2rem;
}

.results-panel h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.mini-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.mini-result-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.25rem;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInMini 0.5s forwards;
}

@keyframes slideInMini {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mini-result-card.completed {
    border-color: rgba(100, 200, 100, 0.3);
}

.mini-result-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.mini-metrics {
    display: flex;
    gap: 1rem;
}

.mini-metric {
    flex: 1;
}

.mini-metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.mini-metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
}

/* Right Column - Leaderboard */
.progress-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.leaderboard-panel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.leaderboard-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.leaderboard-title h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
    background: var(--bg-secondary);
    border-radius: 14px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.leaderboard-item.active {
    border-color: rgba(205, 127, 50, 0.4);
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    background: var(--bg-elevated);
    color: var(--text-muted);
}

.leaderboard-item:nth-child(1) .rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #0d0a08;
}

.leaderboard-item:nth-child(2) .rank-badge {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #0d0a08;
}

.leaderboard-item:nth-child(3) .rank-badge {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: white;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.leaderboard-accuracy {
    font-size: 0.95rem;
    color: var(--accent-gold);
    font-weight: 600;
}

/* ---------------------------
   Results Page (Updated)
   --------------------------- */
.results-header {
    text-align: center;
    margin-bottom: 4rem;
}

.results-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.results-content {
    margin-bottom: 4rem;
}

.full-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
}

.full-result-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2.5rem;
}

.full-result-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.full-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.full-metric {
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
}

.full-metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.full-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.result-plot {
    margin-top: 1.5rem;
    text-align: center;
}

.result-plot img {
    max-width: 100%;
    border-radius: 14px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back:hover {
    border-color: var(--accent-bronze);
    box-shadow: 0 0 40px rgba(205, 127, 50, 0.08);
}

/* ---------------------------
   Alert
   --------------------------- */
.alert {
    background: rgba(220, 100, 100, 0.12);
    border: 1px solid rgba(220, 100, 100, 0.35);
    color: #ffb3b3;
    padding: 1.25rem 1.75rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* ---------------------------
   Responsive
   --------------------------- */
@media (max-width: 1200px) {
    .progress-grid {
        grid-template-columns: 1fr;
    }
    .leaderboard-panel {
        position: static;
    }
}

@media (max-width: 968px) {
    .workflow-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 2rem 1.25rem 4rem;
    }
    .form-section {
        padding: 2rem 1.5rem;
    }
    .btn-analyze {
        width: 100%;
        padding: 1.5rem 2rem;
    }
}

/* ---------------------------
   Improved Remove Button
   --------------------------- */
.remove-file-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.75rem;
    background: linear-gradient(135deg, rgba(220, 50, 50, 0.22), rgba(160, 30, 30, 0.15));
    border: 1px solid rgba(255, 100, 100, 0.4);
    border-radius: 16px;
    color: #ff9999;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 6px 20px rgba(220, 50, 50, 0.2);
}

.remove-file-btn:hover {
    background: linear-gradient(135deg, rgba(220, 50, 50, 0.3), rgba(160, 30, 30, 0.22));
    border-color: rgba(255, 100, 100, 0.55);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(220, 50, 50, 0.3);
}

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

.remove-icon {
    font-size: 1.1rem;
    font-weight: 900;
}

/* ---------------------------
   Premium Image Preview Modal
   --------------------------- */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 3, 2, 0.95);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    animation: fadeIn 0.3s ease;
    padding: 2rem;
}

.image-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 1rem;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.75), 0 0 60px rgba(205, 127, 50, 0.12);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.image-modal-content {
    border-radius: 18px;
    overflow: hidden;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
}

.image-modal-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-bronze), var(--accent-copper));
    border: none;
    border-radius: 50%;
    color: #0d0a08;
    font-size: 1.7rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-close:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(205, 127, 50, 0.35);
}

.image-modal-close:active {
    transform: translateY(-1px) scale(1.02);
}

/* ---------------------------
   Make result images clickable
   --------------------------- */
.result-plot img {
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-plot img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}
