/* Explorer */
.item-count {
    margin-left: 6px;
    font-size: 0.85em;
    opacity: 0.6;
    font-weight: normal;
}

.optional-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    opacity: 0.8;
}

body.dark-mode .optional-badge {
    background: rgba(0, 0, 0, 0.2);
}

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #FFFFFF; /* Pure white, not gradient */
    min-height: 100vh;
    padding: 40px; /* Increased from 20px */
    color: #051B33; /* Deep Navy */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 16px; /* Larger radius */
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04); /* Subtle shadow */
    overflow: hidden;
}

header {
    background: white; /* Not gradient */
    color: #051B33; /* Deep Navy */
    padding: 48px 40px; /* Much more padding */
    text-align: center;
    border-bottom: 1px solid rgba(5, 27, 51, 0.06); /* Ultra-thin border */
}

header h1 {
    font-size: 3.5rem; /* 56px - much larger */
    font-weight: 300; /* Light weight */
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    color: #051B33;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.125rem; /* 18px */
    color: #4A5568; /* Charcoal Gray */
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

.status-bar {
    background: #f0f0f0;
    padding: 10px 30px;
    border-bottom: 1px solid #ddd;
    font-size: 0.9em;
}

.status-bar.success {
    background: #d4edda;
    color: #155724;
}

.status-bar.error {
    background: #f8d7da;
    color: #721c24;
}

.main-content {
    padding: 48px 40px; /* Much more padding */
}

.card {
    background: white;
    border: 1px solid rgba(5, 27, 51, 0.06); /* Ultra-thin border */
    border-radius: 16px; /* Larger radius */
    padding: 48px; /* Much more padding - was 25px */
    margin-bottom: 40px; /* More spacing */
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04); /* Subtle shadow */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
    border: none; /* Remove border on hover */
}

.card h2 {
    color: #051B33; /* Deep Navy */
    margin-bottom: 20px; /* More spacing */
    font-size: 1.75rem; /* 28px */
    font-weight: 400; /* Regular weight */
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.card p {
    color: #4A5568; /* Charcoal Gray */
    margin-bottom: 20px; /* More spacing */
    font-size: 0.9375rem; /* 15px */
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.upload-area {
    margin: 20px 0;
}

.upload-box {
    border: 2px dashed rgba(5, 27, 51, 0.08); /* Ultra-thin dashed border */
    border-radius: 16px;
    padding: 80px 40px; /* Massive whitespace */
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #FAF9F7; /* Subtle champagne */
}

.upload-box:hover {
    border-color: rgba(103, 157, 218, 0.3); /* Sky Blue with opacity */
    background: #f5f5f5;
    transform: scale(1.01);
}

.upload-box.dragover {
    border-color: #679FDA; /* Sky Blue */
    background: rgba(103, 157, 218, 0.02);
    box-shadow: 0 8px 32px rgba(103, 157, 218, 0.1);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.file-info {
    font-size: 0.9em;
    color: #999;
    margin-top: 10px;
}

.file-info-display {
    margin-top: 15px;
    padding: 15px;
    background: #e8f4f8;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

textarea {
    width: 100%;
    padding: 16px 20px; /* Generous padding */
    border: 1px solid rgba(5, 27, 51, 0.1); /* Ultra-thin border */
    border-radius: 8px;
    font-family: 'Inter', sans-serif; /* Not monospace */
    font-size: 15px; /* 15px */
    font-weight: 400;
    resize: vertical;
    margin-bottom: 32px; /* Much more spacing */
    background: white;
    color: #051B33;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

textarea:focus {
    outline: none;
    border-color: #679FDA; /* Sky Blue */
    box-shadow: 0 0 0 3px rgba(103, 157, 218, 0.1);
    transform: translateY(-1px);
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px; /* More padding */
    border: none;
    border-radius: 8px;
    font-size: 15px; /* 15px */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #679FDA; /* Sky Blue */
    color: white;
    box-shadow: 0 2px 8px rgba(103, 157, 218, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: #106ebe;
    box-shadow: 0 4px 16px rgba(103, 157, 218, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(103, 157, 218, 0.2);
}

.btn-secondary {
    background: transparent;
    color: #051B33; /* Deep Navy */
    border: 1px solid rgba(5, 27, 51, 0.2);
}

.btn-secondary:hover {
    background: rgba(5, 27, 51, 0.05);
    border-color: rgba(5, 27, 51, 0.3);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-small {
    padding: 8px 16px; /* More padding */
    font-size: 14px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px; /* Larger radius */
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-small:hover {
    background: #c82333;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
    transform: translateY(-1px);
}

/* Premium btn-sm styling for editor */
.btn-sm {
    padding: 8px 16px; /* Generous padding */
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(5, 27, 51, 0.1); /* Ultra-thin border */
    background: white;
    color: #051B33; /* Deep Navy */
    font-family: 'Inter', sans-serif;
}

.btn-sm:hover {
    background: rgba(5, 27, 51, 0.05);
    border-color: rgba(5, 27, 51, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-sm:active {
    transform: translateY(0);
}

/* Editor-specific premium styling */
.editor-toolbar {
    padding: 16px 24px !important; /* More padding */
    background: #FAF9F7 !important; /* Subtle champagne */
    border-bottom: 1px solid rgba(5, 27, 51, 0.06) !important; /* Ultra-thin border */
    gap: 12px !important; /* More spacing */
    display: flex;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tile-header {
    padding: 8px 16px; /* Reduced padding for more space */
    background: white;
    border-bottom: 1px solid rgba(5, 27, 51, 0.06); /* Ultra-thin border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Prevent shrinking */
}

.tile-header h4 {
    font-size: 1rem; /* 16px - reduced from 20px */
    font-weight: 500;
    letter-spacing: 0em;
    color: #051B33; /* Deep Navy */
    margin: 0;
}

.editor-content {
    background: #FAF9F7 !important; /* Subtle champagne, not gray */
    padding: 0 !important; /* No padding to maximize space */
    align-items: stretch !important; /* Stretch to full width */
}

body.dark-mode .editor-content {
    background: #051B33 !important;
}

/* Sidebar premium styling */
.sidebar {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04) !important; /* Subtle shadow */
    border-right: 1px solid rgba(5, 27, 51, 0.06) !important; /* Ultra-thin border */
}

.sidebar-header {
    padding: 20px 24px !important; /* More padding */
}

.sidebar-header h3 {
    font-size: 1.25rem !important; /* 20px */
    font-weight: 500 !important;
    letter-spacing: 0em !important;
    margin: 0 !important;
}

/* Library tabs premium styling */
.library-tabs {
    padding: 0 16px !important; /* More padding */
    background: #FAF9F7 !important; /* Subtle champagne */
    border-bottom: 1px solid rgba(5, 27, 51, 0.06) !important; /* Ultra-thin border */
}

.lib-tab {
    padding: 12px 24px !important; /* More padding */
    font-size: 0.875rem !important; /* 14px */
    font-weight: 500 !important;
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #4A5568 !important; /* Charcoal Gray */
    opacity: 0.7;
}

.lib-tab.active {
    opacity: 1 !important;
    color: var(--highlight) !important;
    border-bottom: 2px solid var(--highlight) !important;
}

.tab-content {
    padding: 24px !important; /* More padding */
    background: white !important;
}

/* Outline items premium styling */
.outline-item {
    padding: 12px 20px !important; /* More padding */
    font-size: 0.875rem !important; /* 14px */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.outline-item:hover {
    background: rgba(103, 157, 218, 0.04) !important; /* Subtle Sky Blue tint */
}

.outline-item.active {
    background: rgba(103, 157, 218, 0.1) !important;
    border-left: 4px solid var(--highlight) !important; /* Thicker border for active */
    font-weight: 500 !important;
}

/* Global toolbar premium styling */
.global-toolbar {
    background: rgba(250, 249, 247, 0.5) !important; /* Subtle champagne */
    border-bottom: 1px solid rgba(5, 27, 51, 0.06) !important; /* Ultra-thin border */
    padding: 12px 24px !important; /* More padding */
    font-size: 0.875rem !important; /* 14px */
    color: #4A5568 !important; /* Charcoal Gray */
}

/* Modal premium styling */
.modal {
    border-radius: 16px !important; /* Larger radius */
    border: 1px solid rgba(5, 27, 51, 0.06) !important; /* Ultra-thin border */
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08) !important; /* Premium shadow */
}

/* Word page premium styling - expanded to edges */
.word-page {
    box-shadow: none !important; /* No shadow for edge-to-edge */
    border: none !important; /* No border for edge-to-edge */
    width: 100% !important; /* Full width */
    margin: 0 !important; /* No centering */
    padding: 24px 32px !important; /* Internal padding only */
}

/* Empty state premium styling */
.empty-state {
    color: #8A8A8A !important; /* Medium Gray */
    font-size: 0.9375rem !important; /* 15px */
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Premium input styling for all inputs */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select {
    padding: 16px 20px !important; /* Generous padding */
    border: 1px solid rgba(5, 27, 51, 0.1) !important; /* Ultra-thin border */
    border-radius: 8px !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    background: white !important;
    color: #051B33 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none !important;
    border-color: #679FDA !important; /* Sky Blue */
    box-shadow: 0 0 0 3px rgba(103, 157, 218, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* Premium select styling */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2351B33' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px !important;
}

/* Premium textarea styling */
textarea {
    padding: 16px 20px !important; /* Generous padding */
    border: 1px solid rgba(5, 27, 51, 0.1) !important; /* Ultra-thin border */
    border-radius: 8px !important;
    font-size: 15px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 400 !important;
    background: white !important;
    color: #051B33 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    resize: vertical;
}

textarea:focus {
    outline: none !important;
    border-color: #679FDA !important; /* Sky Blue */
    box-shadow: 0 0 0 3px rgba(103, 157, 218, 0.1) !important;
    transform: translateY(-1px) !important;
}

#results {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid #0078d4;
}

.result-item {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.result-item strong {
    color: #679FDA; /* Sky Blue */
}

.result-item.error {
    border-left: 4px solid #dc3545;
    background: #fef6f6;
}

.result-item.success {
    border-left: 4px solid #28a745;
    background: #f6fef6;
}

footer {
    background: white;
    padding: 32px 40px; /* More padding */
    text-align: center;
    color: #4A5568; /* Charcoal Gray */
    border-top: 1px solid rgba(5, 27, 51, 0.06); /* Ultra-thin border */
}

footer p {
    margin: 5px 0;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px; /* More padding */
    background: rgba(250, 249, 247, 0.5); /* Subtle champagne */
    font-size: 0.875rem; /* 14px */
    color: #4A5568; /* Charcoal Gray */
    border-bottom: 1px solid rgba(5, 27, 51, 0.06); /* Ultra-thin border */
}

.breadcrumbs a {
    color: #679FDA; /* Sky Blue */
    text-decoration: none;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.breadcrumbs a:hover {
    color: #106ebe;
    text-decoration: underline;
}

.breadcrumbs span.sep {
    opacity: 0.5;
}

.breadcrumbs span.current {
    font-weight: 600;
}

#backendStatus {
    font-weight: 500;
    color: #679FDA; /* Sky Blue */
}

/* ============================================================================
   CODE REFERENCE COLOR CODING SYSTEM
   ============================================================================ */

/* Code Reference Base Styles */
.code-reference {
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    position: relative;
    transition: all 0.2s ease;
    display: inline-block;
    margin: 0 1px;
}

/* Current/Up-to-Date (Green) */
.code-reference.status-current {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    text-decoration-color: #155724;
}

.code-reference.status-current:hover {
    background-color: #c3e6cb;
    box-shadow: 0 0 0 2px rgba(21, 87, 36, 0.2);
}

/* Outdated but Still Valid (Orange - confirmed out of date) */
.code-reference.status-outdated {
    background-color: #ffe5cc;
    color: #cc6600;
    border: 1px solid #ffcc99;
    text-decoration-color: #cc6600;
}

.code-reference.status-outdated:hover {
    background-color: #ffcc99;
    box-shadow: 0 0 0 2px rgba(204, 102, 0, 0.2);
}

/* Superseded/Expired (Red) */
.code-reference.status-superseded {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    text-decoration-color: #721c24;
    animation: pulse-warning 2s infinite;
}

.code-reference.status-superseded:hover {
    background-color: #f5c6cb;
    box-shadow: 0 0 0 2px rgba(114, 28, 36, 0.3);
}

/* Update Available (Orange) */
.code-reference.status-update-available {
    background-color: #ffe5cc;
    color: #cc6600;
    border: 1px solid #ffcc99;
    text-decoration-color: #cc6600;
}

.code-reference.status-update-available:hover {
    background-color: #ffcc99;
    box-shadow: 0 0 0 2px rgba(204, 102, 0, 0.2);
}

/* Unverified (Blue - has URL but content not verified) */
.code-reference.status-unverified {
    background-color: #cfe2ff;
    color: #084298;
    border: 1px solid #9ec5fe;
    text-decoration-color: #084298;
}

.code-reference.status-unverified:hover {
    background-color: #9ec5fe;
    box-shadow: 0 0 0 2px rgba(8, 66, 152, 0.2);
}

/* Unknown/Not Found (Gray) */
.code-reference.status-unknown {
    background-color: #e9ecef;
    color: #6c757d;
    border: 1px solid #dee2e6;
    text-decoration-color: #6c757d;
}

.code-reference.status-unknown:hover {
    background-color: #dee2e6;
}

/* Syntax Error (Purple/Magenta) */
.code-reference.status-syntax-error {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
    text-decoration-color: #7b1fa2;
    border-style: dashed;
    animation: pulse-warning 2s infinite;
}

.code-reference.status-syntax-error:hover {
    background-color: #e1bee7;
    box-shadow: 0 0 0 2px rgba(123, 31, 162, 0.3);
}

/* Pulsing animation for critical issues */
@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Status indicator icon */
.code-reference::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
}

.code-reference.status-current::after {
    background-color: #28a745;
}

.code-reference.status-outdated::after {
    background-color: #fd7e14;
}

.code-reference.status-superseded::after {
    background-color: #dc3545;
}

.code-reference.status-update-available::after {
    background-color: #fd7e14;
}

.code-reference.status-unverified::after {
    background-color: #0d6efd;
}

.code-reference.status-unknown::after {
    background-color: #6c757d;
}

.code-reference.status-syntax-error::after {
    background-color: #9c27b0;
}

/* Code Status Indicator in Toolbar */
.code-status-indicator {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.code-status-indicator.status-compliant {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.code-status-indicator.status-warnings {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.code-status-indicator.status-critical {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    animation: pulse-warning 2s infinite;
}

/* Code Reference Popup */
.code-reference-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px; /* More padding */
    border-radius: 16px; /* Larger radius */
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08); /* Premium shadow */
    z-index: 10000;
    max-width: 400px;
    border: 1px solid rgba(5, 27, 51, 0.06); /* Ultra-thin border */
}

.code-reference-popup h3 {
    margin: 0 0 20px 0; /* More spacing */
    color: #051B33; /* Deep Navy */
    font-size: 1.25rem; /* 20px */
    font-weight: 500;
    letter-spacing: 0em;
}

.code-reference-popup p {
    margin: 10px 0;
    color: #333;
}

.code-reference-popup a {
    color: #0078d4;
    text-decoration: none;
    font-weight: 600;
}

.code-reference-popup a:hover {
    text-decoration: underline;
}

.code-reference-popup button {
    margin-top: 20px; /* More spacing */
    padding: 14px 32px; /* More padding */
    background: #679FDA; /* Sky Blue */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(103, 157, 218, 0.2);
}

.code-reference-popup button:hover {
    background: #106ebe;
    box-shadow: 0 4px 16px rgba(103, 157, 218, 0.3);
    transform: translateY(-1px);
}

/* Dark mode support for code references */
body.dark-mode .code-reference.status-current {
    background-color: #1e4620;
    color: #81c784;
    border-color: #2e7d32;
}

body.dark-mode .code-reference.status-outdated {
    background-color: #5d2f0f;
    color: #ff9800;
    border-color: #e65100;
}

body.dark-mode .code-reference.status-superseded {
    background-color: #4a1f1f;
    color: #e57373;
    border-color: #c62828;
}

body.dark-mode .code-reference.status-update-available {
    background-color: #5d2f0f;
    color: #ff9800;
    border-color: #e65100;
}

body.dark-mode .code-reference.status-unknown {
    background-color: #424242;
    color: #bdbdbd;
    border-color: #616161;
}

body.dark-mode .code-reference.status-syntax-error {
    background-color: #4a148c;
    color: #ce93d8;
    border-color: #7b1fa2;
}

body.dark-mode .code-reference-popup {
    background: #1a1a1a;
    color: #f8f9fa;
    border-color: #679FDA;
}

body.dark-mode .code-reference-popup h3 {
    color: #94C1F2;
}

body.dark-mode .code-reference-popup a {
    color: #94C1F2;
}

/* Code Add Modal */
.code-add-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.code-add-modal-content {
    background: white;
    padding: 40px; /* More padding */
    border-radius: 16px; /* Larger radius */
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08); /* Premium shadow */
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(5, 27, 51, 0.06); /* Ultra-thin border */
    position: relative; /* For dragging */
}

.code-add-modal-header {
    transition: background-color 0.2s ease;
}

.code-add-modal-header:hover {
    background-color: rgba(0,0,0,0.04) !important;
}

.code-add-modal-header:active {
    background-color: rgba(0,0,0,0.06) !important;
}

.code-add-modal-content h2 {
    margin: 0 0 32px 0; /* More spacing */
    color: #051B33; /* Deep Navy */
    font-size: 2.5rem; /* 40px */
    font-weight: 300; /* Light weight */
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.code-add-modal-content label {
    display: block;
    margin-bottom: 8px; /* More spacing */
    font-weight: 500;
    font-size: 12px; /* 12px */
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #4A5568; /* Charcoal Gray */
}

.code-add-modal-content input,
.code-add-modal-content textarea {
    width: 100%;
    padding: 16px 20px; /* Generous padding */
    border: 1px solid rgba(5, 27, 51, 0.1); /* Ultra-thin border */
    border-radius: 8px;
    font-size: 15px; /* 15px */
    font-family: 'Inter', sans-serif;
    background: white;
    color: #051B33;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.code-add-modal-content input:focus,
.code-add-modal-content textarea:focus {
    outline: none;
    border-color: #679FDA; /* Sky Blue */
    box-shadow: 0 0 0 3px rgba(103, 157, 218, 0.1);
    transform: translateY(-1px);
}

.code-add-modal-content small {
    color: #666;
    font-size: 0.85em;
    display: block;
    margin-top: 5px;
}

.code-add-modal-content button[type="submit"] {
    padding: 14px 32px; /* More padding */
    background: #679FDA; /* Sky Blue */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(103, 157, 218, 0.2);
}

.code-add-modal-content button[type="submit"]:hover:not(:disabled) {
    background: #106ebe;
    box-shadow: 0 4px 16px rgba(103, 157, 218, 0.3);
    transform: translateY(-1px);
}

.code-add-modal-content button[type="submit"]:active {
    transform: translateY(0);
}

.code-add-modal-content button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
}

body.dark-mode .code-add-modal-content {
    background: #1a1a1a;
    color: #f8f9fa;
}

body.dark-mode .code-add-modal-content h2 {
    color: #94C1F2;
}

body.dark-mode .code-add-modal-content label {
    color: #f8f9fa;
}

body.dark-mode .code-add-modal-content input,
body.dark-mode .code-add-modal-content textarea {
    background: #2a2a2a;
    color: #f8f9fa;
    border-color: #444;
}

body.dark-mode .code-add-modal-content input:focus,
body.dark-mode .code-add-modal-content textarea:focus {
    border-color: #94C1F2;
    box-shadow: 0 0 0 2px rgba(148, 193, 242, 0.2);
}

body.dark-mode .code-add-modal-content small {
    color: #bdbdbd;
}