/* ========================================= */
/* LIGHT MODE (DEFAULT) */
/* ========================================= */
:root {
    /* Colors */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Light mode backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #f1f5f9;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    /* Light mode text */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    
    /* Light mode borders */
    --border: #e2e8f0;
    --border-light: #cbd5e1;
}

/* ========================================= */
/* DARK MODE OVERRIDES */
/* ========================================= */
body.dark-mode {
    --primary: #00d9ff;
    --primary-dark: #00a8cc;
    
    /* Dark mode backgrounds */
    --bg-primary: #0a0e17;
    --bg-secondary: #131824;
    --bg-dark: #0a0e17;
    --bg-card: #131824;
    --bg-hover: #1a1f2e;
    
    /* Dark mode text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    
    /* Dark mode borders */
    --border: #1e293b;
    --border-light: #334155;
}

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

body {
    font-family: 'Work Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode gradient background */
body.dark-mode {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #0f1419 100%);
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

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

.login-header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.login-form {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 217, 255, 0.1);
}

.demo-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Navbar */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.nav-brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Work Sans', sans-serif;
}

.nav-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-user span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Content Views */
.content-view {
    display: none;
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
    overflow-y: auto;
    height: calc(100vh - 80px);
}

.content-view.active {
    display: block;
}

.view-header {
    margin-bottom: 2rem;
}

.view-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.view-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary);
}

/* Foundation Grid */
.foundation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.foundation-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.foundation-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.2);
}

.foundation-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.foundation-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.foundation-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-hover);
    border-radius: 6px;
}

.foundation-meta-item .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.foundation-meta-item .value {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Strategies Table */
.strategies-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.strategies-table {
    width: 100%;
    border-collapse: collapse;
}

.strategies-table thead {
    background: var(--bg-hover);
}

.strategies-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.strategies-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.strategies-table tbody tr {
    transition: all 0.2s ease;
}

.strategies-table tbody tr:hover {
    background: var(--bg-hover);
}

.strategy-name {
    font-weight: 600;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.badge.stock {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
}

.badge.crypto {
    background: rgba(0, 217, 255, 0.2);
    color: var(--primary);
}

.badge.long {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.badge.short {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.badge.sideways {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
}

.score-badge.high {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 2px solid var(--success);
}

.score-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 2px solid var(--warning);
}

.score-badge.low {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 2px solid var(--danger);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn-icon.delete:hover {
    background: var(--danger);
    border-color: var(--danger);
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

.analytics-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Work Sans', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Work Sans', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 900px;
}

.modal-xlarge {
    max-width: 1200px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.5rem;
    color: var(--primary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-content form {
    padding: 2rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

/* Form Tabs */
.form-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Screenshot Preview */
.screenshot-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.screenshot-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.screenshot-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.screenshot-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Scoring Section */
.scoring-section {
    background: var(--bg-dark);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.scoring-note {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.score-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.form-group input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--danger) 0%, var(--warning) 50%, var(--success) 100%);
    border-radius: 4px;
    outline: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border: 3px solid var(--bg-card);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.5);
    transition: all 0.2s ease;
}

.form-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.7);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border: 3px solid var(--bg-card);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.5);
    transition: all 0.2s ease;
}

.form-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.7);
}

.score-value-input {
    width: 80px;
    padding: 0.5rem;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

.score-value-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.2);
}

/* Score Gauge */
.overall-score-display {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
}

.overall-score-display h4 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.score-gauge {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    background: conic-gradient(
        from 180deg,
        var(--danger) 0deg,
        var(--warning) 120deg,
        var(--success) 240deg,
        var(--success) 360deg
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-gauge::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background: var(--bg-card);
    border-radius: 50%;
}

.score-number {
    position: relative;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    z-index: 1;
}

/* Detail Content */
.detail-content {
    padding: 2rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    background: var(--bg-dark);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.detail-item .label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.detail-item .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.detail-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.detail-screenshots img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
}

/* Comments */
.comments-section {
    padding: 2rem;
    border-top: 1px solid var(--border);
}

.comments-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.comment-item {
    background: var(--bg-dark);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary);
}

.comment-email {
    font-size: 0.85em;
    color: var(--text-secondary);
}

.comment-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.comment-text {
    color: var(--text-primary);
    line-height: 1.6;
}

.comment-form {
    display: flex;
    gap: 1rem;
}

.comment-form textarea {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
    }

    .strategies-table-container {
        overflow-x: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========================================= */
/* SETTINGS PAGE */
/* ========================================= */

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.settings-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.3rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.setting-info {
    flex: 1;
}

.setting-info strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}

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

/* ========================================= */
/* TOGGLE SWITCH */
/* ========================================= */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.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: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

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

.toggle-slider:hover {
    opacity: 0.9;
}

/* ========================================= */
/* STATS GRID */
/* ========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

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

/* ========================================= */
/* FOUNDATION CARD ENHANCEMENTS */
/* ========================================= */

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

.foundation-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.btn-icon.delete:hover {
    filter: brightness(1.2);
}

/* ========================================= */
/* DARK MODE */
/* ========================================= */

body.dark-mode {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --card-bg: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #404040;
}

body.dark-mode .navbar {
    background: #1f1f1f;
    border-bottom-color: #404040;
}

body.dark-mode .btn-primary {
    background: var(--primary);
    color: white;
}

body.dark-mode .btn-secondary {
    background: #404040;
    color: white;
}

body.dark-mode .modal-content {
    background: #2a2a2a;
    border-color: #404040;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #1a1a1a;
    border-color: #404040;
    color: white;
}

body.dark-mode .foundation-card,
body.dark-mode .strategy-card {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .badge {
    opacity: 0.9;
}

body.dark-mode .analytics-card {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-mode .stat-card {
    background: #1a1a1a;
    border-color: #404040;
}

body.dark-mode .setting-item {
    border-bottom-color: #404040;
}

/* ========================================= */
/* RESPONSIVE ADJUSTMENTS */
/* ========================================= */

@media (max-width: 768px) {
    .settings-section {
        padding: 1.5rem;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .toggle-switch {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .foundation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .foundation-actions {
        align-self: flex-end;
    }
}

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

/* Shake animation for wrong input */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* ==============================================
   AUTOMATED SCORING GAUGES
   ============================================== */

.overall-score-container {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a1a1a 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.score-gauge-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 0 auto;
    max-width: 400px;
}

.score-gauge-large svg {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.score-number-large {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: -1rem;
}

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

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.metric-score-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 160px;
}

.metric-score-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-color: var(--primary);
}

.metric-score-card h4 {
    margin: 0 0 1rem 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.score-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin: 0.5rem 0;
}

.score-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.score-outof {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.metric-value {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: auto;
    font-weight: 500;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    width: 100%;
}

/* Score color classes */
.score-display[data-score="10"] .score-number { color: #22c55e; }
.score-display[data-score="9"] .score-number { color: #22c55e; }
.score-display[data-score="8"] .score-number { color: #22c55e; }
.score-display[data-score="7"] .score-number { color: #eab308; }
.score-display[data-score="6"] .score-number { color: #eab308; }
.score-display[data-score="5"] .score-number { color: #f59e0b; }
.score-display[data-score="4"] .score-number { color: #f59e0b; }
.score-display[data-score="3"] .score-number { color: #ef4444; }
.score-display[data-score="2"] .score-number { color: #ef4444; }
.score-display[data-score="1"] .score-number { color: #ef4444; }
.score-display[data-score="0"] .score-number { color: #ef4444; }

/* Remove old gauge styles */
.score-gauge-small {
    display: none;
}

.score-small-number {
    display: none;
}

.score-small-label {
    display: none;
}

.score-breakdown {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.score-breakdown h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.breakdown-grid {
    display: grid;
    gap: 0.75rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.breakdown-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.breakdown-value {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Score color classes */
.score-excellent { color: #22c55e !important; }
.score-good { color: #84cc16 !important; }
.score-average { color: #eab308 !important; }
.score-poor { color: #f59e0b !important; }
.score-fail { color: #ef4444 !important; }

/* Gauge animations */
.score-gauge-small svg line,
.score-gauge-large svg line {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center bottom;
}

/* Responsive */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .score-number-large {
        font-size: 3rem;
    }
    .overall-score-container {
        padding: 1.5rem;
    }
}
