/* Typing Speed Test Custom Styles */

/* Typing text display */
.typing-text-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem;
    line-height: 2;
    padding: 1.5rem;
    background-color: var(--bs-body-bg);
    border: 2px solid var(--bs-border-color);
    border-radius: 0.5rem;
    min-height: 150px;
    user-select: none;
    letter-spacing: 0.5px;
}

.typing-text-display .char {
    position: relative;
    transition: all 0.1s ease;
}

.typing-text-display .char.correct {
    color: var(--bs-success);
    font-weight: 500;
}

.typing-text-display .char.incorrect {
    color: var(--bs-danger);
    background-color: rgba(220, 53, 69, 0.1);
    font-weight: 500;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .typing-text-display .char.incorrect {
    background-color: rgba(220, 53, 69, 0.2);
}

/* Typing input */
.typing-input {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    resize: none;
}

.typing-input:disabled {
    background-color: var(--bs-secondary-bg);
    cursor: not-allowed;
}

/* Timer display */
.timer-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    color: var(--bs-primary);
}

/* Stat cards */
.stat-card {
    border: 2px solid var(--bs-border-color);
    transition: all 0.3s ease;
}

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

[data-bs-theme="dark"] .stat-card:hover {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
}

.stat-card .stat-icon {
    opacity: 0.6;
}

.stat-card h3 {
    font-weight: 700;
    color: var(--bs-primary);
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.3s ease;
}

/* Mode selector enhancements */
.mode-selector-modern .mode-option {
    flex: 1;
    min-width: 200px;
}

.mode-selector-modern .mode-label {
    cursor: pointer;
    height: 100%;
}

/* Results section highlight */
#resultsSection {
    animation: slideIn 0.5s ease;
}

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

/* Character cursor effect */
.typing-text-display .char:first-child::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--bs-primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* Records section */
#recordsContent .toolOutput {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Chart container */
#performanceChart {
    max-width: 100%;
    height: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .typing-text-display {
        font-size: 1rem;
        padding: 1rem;
        line-height: 1.8;
    }

    .typing-input {
        font-size: 1rem;
    }

    .mode-selector-modern .mode-option {
        min-width: 100%;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }
}

/* Button hover effects */
.toolBtn {
    transition: all 0.2s ease;
}

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

[data-bs-theme="dark"] .toolBtn:hover {
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

/* Card header styling */
.card-header h6 {
    font-weight: 600;
}

/* Badge colors for status */
.badge.bg-charging {
    background-color: #22c55e !important;
}

.badge.bg-full {
    background-color: #10b981 !important;
}

.badge.bg-discharging {
    background-color: #f59e0b !important;
}

.badge.bg-low {
    background-color: #dc2626 !important;
}

.badge.bg-orange {
    background-color: #f97316 !important;
}
