* { font-family: 'Inter', sans-serif; }
.font-mono { font-family: 'Space Mono', monospace; }

:root {
    --primary-color: #0099ff;
    --primary-light: #00d9ff;
    --primary-dark: #0080cc;
    --primary-rgb: 0, 153, 255;
}

/* Command Palette Styles */
.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
}

.command-palette-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 600px;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

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

.command-palette-input {
    width: 100%;
    padding: 16px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 500;
}

.command-palette-input::placeholder {
    color: #9ca3af;
}

.command-palette-list {
    max-height: 400px;
    overflow-y: auto;
}

.command-palette-group-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    padding: 8px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.command-palette-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.command-palette-item:hover,
.command-palette-item.selected {
    background-color: #f3f4f6;
}

.command-palette-item-title {
    font-weight: 500;
    color: #111827;
    margin-bottom: 4px;
}

.command-palette-item-description {
    font-size: 13px;
    color: #6b7280;
}

.dark-mode .command-palette-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.dark-mode .command-palette-modal {
    background: #1f2937;
}

.dark-mode .command-palette-input {
    background: #111827;
    color: #f3f4f6;
    border-bottom-color: #374151;
}

.dark-mode .command-palette-input::placeholder {
    color: #6b7280;
}

.dark-mode .command-palette-group-label {
    background: #0f1419;
    color: #9ca3af;
    border-bottom-color: #374151;
}

.dark-mode .command-palette-item {
    color: #f3f4f6;
}

.dark-mode .command-palette-item:hover,
.dark-mode .command-palette-item.selected {
    background-color: #374151;
}

.dark-mode .command-palette-item-title {
    color: #f3f4f6;
}

.dark-mode .command-palette-item-description {
    color: #9ca3af;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark-mode .dark-mode-toggle {
    background: #1f2937;
    border-color: #374151;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

.glow-primary {
    box-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3);
}

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

.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.4);
    transform: translateY(-2px);
}

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

.loading-animation {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(var(--primary-rgb), 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes button-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes scale-in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.score-card-enter {
    animation: scale-in 0.4s ease-out;
}

.category-card {
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 24px rgba(0, 153, 255, 0.2);
}

.grade-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
    font-family: 'Space Mono', monospace;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grade-circle:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.grade-a { background: linear-gradient(135deg, #10b981, #059669); }
.grade-b { background: linear-gradient(135deg, var(--primary-color), var(--primary-light)); }
.grade-c { background: linear-gradient(135deg, #f59e0b, #d97706); }
.grade-d { background: linear-gradient(135deg, #f97316, #ea580c); }
.grade-f { background: linear-gradient(135deg, #ef4444, #dc2626); }

.progress-bar {
    transition: width 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Dark mode styles */
body.dark-mode {
    background: #0f1419;
    color: #e5e7eb;
}

body.dark-mode header {
    background: rgba(15, 20, 25, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode a:not(.btn-primary):not(.btn-electric) {
    color: #e5e7eb;
}

body.dark-mode a:not(.btn-primary):not(.btn-electric):hover {
    color: var(--primary-light);
}

body.dark-mode .bg-white {
    background: #1a202c;
}

body.dark-mode .bg-gray-50 {
    background: #2d3748;
}

body.dark-mode .bg-gray-100 {
    background: #2d3748;
}

body.dark-mode .bg-gray-200 {
    background: #4a5568;
}

body.dark-mode .border-gray-100,
body.dark-mode .border-gray-200 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .text-gray-600 {
    color: #cbd5e0;
}

body.dark-mode .text-gray-700 {
    color: #a0aec0;
}

body.dark-mode .text-gray-900 {
    color: #e5e7eb;
}

body.dark-mode .text-gray-400 {
    color: #9ca3af;
}

body.dark-mode .text-gray-300 {
    color: #d1d5db;
}

body.dark-mode .bg-gradient-to-br.from-blue-50 {
    background: linear-gradient(to bottom right, #1e3a5f, #172a4a) !important;
}

body.dark-mode .bg-blue-50 {
    background: #1e3a5f;
}

body.dark-mode .bg-red-50 {
    background: #4c2626;
}

body.dark-mode .border-red-200 {
    border-color: #7f1d1d;
}

body.dark-mode .text-red-700 {
    color: #fca5a5;
}
