@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ==========================================================================
   DESIGN TOKENS & VARIABLES
   ========================================================================== */
:root {
    --bg: #0A0A0A;
    --card: #111111;
    --card-hover: #151515;
    --border: #262626;
    --border-hover: #404040;
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --primary-subtle: rgba(59, 130, 246, 0.1);
    --success: #22C55E;
    --success-subtle: rgba(34, 197, 94, 0.15);
    --error: #EF4444;
    --error-subtle: rgba(239, 68, 68, 0.15);
    --warning: #F59E0B;
    --warning-subtle: rgba(245, 158, 11, 0.15);
    --text: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-tertiary: #52525B;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar navigation */
.sidebar {
    width: 260px;
    background-color: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
    box-shadow: var(--shadow-inset);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.sidebar-logo svg {
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

.sidebar-nav {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.03);
}

.nav-link.active {
    color: var(--primary);
    background-color: var(--primary-subtle);
    font-weight: 600;
}

.nav-link svg {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.nav-divider {
    height: 1px;
    background-color: var(--border);
    margin: 12px 16px;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 40px;
    min-height: 100vh;
    min-width: 0;
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

/* Mobile Top Nav & Sidebar Overlay */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 99;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 98;
    animation: fadeIn 0.2s ease-out;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
}

/* Grid layout */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Premium Card */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow), var(--shadow-inset);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.card-header svg {
    color: var(--primary);
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

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

.form-input, .form-textarea, .form-select {
    width: 100%;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--font-mono);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.35);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border);
    color: var(--text);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--border-hover);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
}
.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.btn-success {
    background-color: var(--success);
    color: white;
}
.btn-success:hover {
    background-color: #16a34a;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.35);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Tabs */
.tabs {
    display: inline-flex;
    background-color: var(--bg);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    user-select: none;
}

.tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.tab.active {
    background-color: var(--card);
    color: var(--text);
    box-shadow: var(--shadow-inset);
    border: 1px solid var(--border);
}

/* Drag and Drop Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.01);
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--primary);
    background-color: var(--primary-subtle);
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-zone-icon {
    color: var(--text-tertiary);
    transition: var(--transition);
}
.upload-zone:hover .upload-zone-icon {
    color: var(--primary);
    transform: translateY(-2px);
}

.upload-zone-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.upload-zone-hint {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.upload-zone.has-file {
    border-style: solid;
    border-color: var(--success);
    background-color: var(--success-subtle);
}

/* Result / Download Area */
.result-area {
    margin-top: 24px;
    padding: 20px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.image-preview {
    max-width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    background: #000;
}

.image-preview img {
    max-width: 100%;
    max-height: 280px;
    display: block;
    object-fit: contain;
}

.qr-preview {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    width: fit-content;
    margin: 0 auto;
}

.qr-preview img {
    display: block;
    max-width: 200px;
}

/* Callout Info Box */
.callout {
    background-color: var(--primary-subtle);
    border-left: 3px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
}

.callout svg {
    color: var(--primary);
    flex-shrink: 0;
}

.callout p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background-color: var(--success-subtle);
    color: var(--success);
}

.badge-primary {
    background-color: var(--primary-subtle);
    color: var(--primary);
}

.badge-warning {
    background-color: var(--warning-subtle);
    color: var(--warning);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--card);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 16px 24px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border);
    background-color: rgba(0, 0, 0, 0.2);
}

td {
    padding: 18px 24px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.01);
}

/* Comparison Cards */
.compare-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.compare-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* CSS Bar Chart */
.bar-chart-container {
    margin-top: 32px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    height: 160px;
    padding-top: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    max-width: 80px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bar-tooltip {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg);
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
}

.bar:hover .bar-tooltip {
    opacity: 1;
}

.bar-label {
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* About Page Sections */
.about-section {
    margin-bottom: 40px;
}

.about-section h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background-color: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    min-width: 300px;
    max-width: 450px;
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.toast-icon svg {
    width: 18px;
    height: 18px;
}

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

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toast-close:hover {
    color: var(--text);
    background-color: rgba(255, 255, 255, 0.05);
}

.toast.removing {
    animation: toastOut 0.2s ease-in forwards;
}

/* ==========================================================================
   LANDING PAGE (NO-SIDEBAR LAYOUT)
   ========================================================================== */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 40px;
}

.hero {
    text-align: center;
    padding: 100px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #FFFFFF 40%, #A1A1AA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 580px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.features-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px 100px;
}

.features-section h2 {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.feature-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-inset);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.feature-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: var(--primary-subtle);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.2));
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ==========================================================================
   ANIMATIONS & EFFECTS
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%) translateY(0);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Loading Spin Animation */
.spinner {
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

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

/* Upgraded Benchmark Bar Chart Visuals */
.bar-chart-visual {
    display: flex;
    gap: 16px;
    height: 220px;
    padding-top: 24px;
    margin-bottom: 12px;
    position: relative;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    text-align: right;
    width: 60px;
    border-right: 1px solid var(--border);
    padding-right: 12px;
    height: calc(100% - 24px); /* Align with the actual bar body height */
}

.bar-chart-body {
    flex: 1;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: calc(100% - 24px);
    position: relative;
    /* Grid horizontal lines background */
    background-image: linear-gradient(to top, var(--border) 1px, transparent 1px);
    background-size: 100% 50px;
}

.bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    width: 60px;
    position: relative;
}

.bar-value-label {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 500;
    white-space: nowrap;
}

.bar-filled {
    width: 32px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.bar-aes {
    background: linear-gradient(to top, #16a34a, #22c55e);
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.25);
}

.bar-des {
    background: linear-gradient(to top, #d97706, #f59e0b);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
}

.bar-rsa {
    background: linear-gradient(to top, #2563eb, #3b82f6);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

.bar-error {
    background: var(--error);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

.bar-axis-label {
    position: absolute;
    bottom: -24px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    left: 50%;
    transform: translateX(-50%);
}

/* Key Length Visualizer Styles */
.key-visual-track {
    width: 100%;
    height: 12px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    overflow: hidden;
}

.key-visual-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-des {
    background: linear-gradient(to right, #b91c1c, #ef4444);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.fill-aes {
    background: linear-gradient(to right, #15803d, #22c55e);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.fill-rsa {
    background: linear-gradient(to right, #1d4ed8, #3b82f6);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .about-grid, .compare-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Hide regular sidebar */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        padding: 100px 20px 40px; /* Leave space for top header */
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.75rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-nav {
        padding: 20px;
    }
    
    .features-section {
        padding: 40px 20px 80px;
    }

    /* Mobile optimisations for cards and tables */
    .card {
        padding: 20px;
    }

    th, td {
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    .key-visual-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6px;
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* Extra small screens (Phones) */
@media (max-width: 480px) {
    .main-content {
        padding: 90px 12px 30px;
    }

    .card {
        padding: 16px;
    }

    th, td {
        padding: 10px 10px;
        font-size: 0.75rem;
    }

    /* Scaling down bar charts to fit phone screen width */
    .chart-y-axis {
        width: 48px;
        font-size: 0.65rem;
        padding-right: 6px;
    }

    .bar-column {
        width: 44px;
    }

    .bar-filled {
        width: 20px;
    }

    .bar-value-label {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }

    .bar-axis-label {
        font-size: 0.7rem;
        bottom: -20px;
    }

    .bar-chart-visual {
        height: 180px;
    }
}
