:root { 
    --accent-color: #01497c;
    --light-gray: #f8f9fa;
    --border-color: #eaeaea;
    --text-color: #333;
    --text-muted: #6c757d;
    --key-bg: #f0f4f8;
    --key-active: #2c7da0;
    --key-triggered: #a9d6e5;
    --key-pressed: #01497c;
}
         
        /* Test Tabs */
        .test-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }
        
        .test-tab {
            padding: 0.75rem 1.5rem;
            background-color: var(--light-gray);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 500;
        }
        
        .test-tab:hover {
            background-color: #e9ecef;
        }
        
        .test-tab.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }
        
        /* Test Area */
        .test-area {
            background-color: var(--light-gray);
            border-radius: 8px;
            padding: 2rem;
            margin-bottom: 1.5rem;
            border: 1px solid var(--border-color);
            min-height: 400px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }
        
        .test-instructions {
            margin-bottom: 1.5rem;
            max-width: 600px;
        }
        
        .test-content {
            width: 100%;
            margin: 1.5rem 0;
        }
        
        .test-controls {
            display: flex;
            justify-content: center;
            gap: 1rem;
            margin-top: 1.5rem;
        }
        
        .btn-lg {
            padding: 0.75rem 2rem;
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .btn-success {
            background-color: #28a745;
            border-color: #28a745;
        }
        
        .btn-warning {
            background-color: #ffc107;
            border-color: #ffc107;
            color: #333;
        }
        
        .btn-warning:hover {
            background-color: #e0a800;
            border-color: #d39e00;
        }
        
        .btn-danger {
            background-color: #dc3545;
            border-color: #dc3545;
        }
        
        /* Keyboard Overlay */
        .keyboard-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1050;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .keyboard-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .keyboard-container {
            background-color: white;
            border-radius: 8px;
            padding: 2rem;
            max-width: 1200px;
            width: 90%;
            max-height: 90vh;
            overflow: auto;
            position: relative;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        }
        
        .close-overlay {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--text-muted);
            cursor: pointer;
            transition: color 0.3s;
        }
        
        .close-overlay:hover {
            color: var(--primary-color);
        }
        
        .keyboard-layout {
            background-color: #f0f4f8;
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            border: 1px solid var(--border-color);
        }
        
        .keyboard-row {
            display: flex;
            justify-content: center;
            margin-bottom: 0.5rem;
        }
        
        .key {
            min-width: 40px;
            height: 40px;
            background-color: var(--key-bg);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            margin: 0 0.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 500;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            transition: all 0.2s;
            padding: 0 10px;
            position: relative;
            font-size: 0.9rem;
        }
        
        .key.active {
            background-color: var(--key-active);
            color: white;
            border-color: var(--key-active);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(44, 125, 160, 0.3);
        }
        
        .key.triggered {
            background-color: var(--key-triggered);
            color: var(--text-color);
            border-color: var(--key-triggered);
        }
        
        .key.pressed {
            background-color: var(--key-pressed);
            color: white;
            border-color: var(--key-pressed);
        }
        
        .key.space {
            min-width: 200px;
            flex-grow: 1;
        }
        
        .key.tab {
            min-width: 60px;
        }
        
        .key.caps {
            min-width: 70px;
        }
        
        .key.shift {
            min-width: 90px;
        }
        
        .key.enter {
            min-width: 80px;
        }
        
        .key.backspace {
            min-width: 80px;
        }
        
        .key.ctrl, .key.alt, .key.win {
            min-width: 50px;
        }
        
        .key.fn {
            min-width: 50px;
        }
        
        .key.arrow {
            min-width: 40px;
        }
        
        .key.function-key {
            min-width: 50px;
            height: 40px;
            font-size: 0.8rem;
        }
        
        .key.esc {
            min-width: 50px;
        }
        
        .key.print-screen {
            min-width: 70px;
        }
        
        .key.scroll-lock {
            min-width: 70px;
        }
        
        .key.pause {
            min-width: 50px;
        }
        
        .key.small {
            min-width: 40px;
            height: 40px;
            font-size: 0.8rem;
        }
        
        .key.medium {
            min-width: 60px;
        }
        
        .key.large {
            min-width: 80px;
        }
        
        .key.xlarge {
            min-width: 100px;
        }
        
        .key.xxlarge {
            min-width: 120px;
        }
        
        .key.spacebar {
            min-width: 250px;
        }
        
        .key-group {
            display: flex;
            justify-content: center;
            margin-bottom: 0.5rem;
        }
        
        .key-group-title {
            text-align: center;
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
        }
        
        .keyboard-section {
            margin-bottom: 1.5rem;
        }
        
        .keyboard-section-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--primary-color);
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        /* Test Stats */
        .test-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
            margin: 1.5rem 0;
        }
        
        .stat-card {
            background: white;
            border-radius: 8px;
            padding: 1.5rem;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }
        
        .stat-title {
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--primary-color);
        }
        
        .stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--accent-color);
            margin-bottom: 0.5rem;
        }
        
        .stat-desc {
            color: var(--text-muted);
        }
        
        /* Chart Container */
        .chart-container {
            background: white;
            border-radius: 8px;
            padding: 1.5rem;
            margin-top: 1.5rem;
            border: 1px solid var(--border-color);
            height: 300px;
        }
        
        .chart-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--primary-color);
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        
        /* Result Area */
        .result-container {
            background-color: var(--light-gray);
            border-radius: 6px;
            padding: 1.5rem;
            margin-top: 1.5rem;
            position: relative;
            border: 1px solid var(--border-color);
        }
        
        .result-title {
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--primary-color);
        }
        
        .result-content {
            font-family: 'Courier New', monospace;
            word-break: break-all;
            padding: 12px;
            background-color: white;
            border-radius: 4px;
            border: 1px solid #eee;
            font-size: 0.95rem;
        }
        
        .copy-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            background: white;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            padding: 0.4rem 0.75rem;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .copy-btn:hover {
            background-color: var(--light-gray);
        }
        
        /* Toast notifications */
        .toast-container {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1050;
        }
        
        .toast {
            background-color: white;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 1rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            max-width: 350px;
            transform: translateY(100px);
            opacity: 0;
            transition: all 0.3s ease;
        }
        
        .toast.show {
            transform: translateY(0);
            opacity: 1;
        }
        
        .toast-success {
            border-left: 4px solid #2ecc71;
        }
        
        .toast-error {
            border-left: 4px solid #e74c3c;
        }
        
        .toast-info {
            border-left: 4px solid #3498db;
        }
        
        .toast-icon {
            font-size: 1.5rem;
        }
        
        .toast-success .toast-icon {
            color: #2ecc71;
        }
        
        .toast-error .toast-icon {
            color: #e74c3c;
        }
        
        .toast-info .toast-icon {
            color: #3498db;
        }
        
        /* Responsive Adjustments */
        @media (max-width: 768px) {
            .tool-card {
                padding: 1.5rem;
            }
            
            .key {
                min-width: 35px;
                height: 35px;
                font-size: 0.75rem;
                padding: 0 5px;
            }
            
            .key.space {
                min-width: 150px;
            }
            
            .key.tab {
                min-width: 50px;
            }
            
            .key.caps {
                min-width: 60px;
            }
            
            .key.shift {
                min-width: 70px;
            }
            
            .key.enter {
                min-width: 60px;
            }
            
            .key.backspace {
                min-width: 60px;
            }
            
            .key.ctrl, .key.alt, .key.win {
                min-width: 40px;
            }
            
            .key.fn {
                min-width: 40px;
            }
            
            .key.arrow {
                min-width: 35px;
            }
            
            .key.function-key {
                min-width: 40px;
                height: 35px;
                font-size: 0.7rem;
            }
            
            .key.spacebar {
                min-width: 180px;
            }
            
            .keyboard-container {
                padding: 1rem;
            }
        }
    