/**
 * Calculation Speed Test Styles
 * Version: 1.0.0 - Dark theme matching Ishihara test design
 */

/* Container */
.calculation-test-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    background-color: #f5f7fa;
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.calculation-header {
    text-align: center;
    margin-bottom: 30px;
}

.calculation-header h2 {
    font-size: 2em;
    font-weight: 600;
    color: #1e293b!important;
    margin: 0;
}

/* Start Screen */
.calculation-start-screen {
    background: #ffffff;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.start-content {
    max-width: 600px;
    margin: 0 auto;
}

.start-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.start-content h3 {
    font-size: 2em;
    font-weight: 600;
    color: #1e293b!important;
    margin: 0 0 20px 0;
}

.start-description {
    font-size: 1.2em;
    color: #64748b;
    margin-bottom: 30px;
}

.start-info {
    font-size: 1em;
    color: #909090;
    line-height: 1.8;
    text-align: left;
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    margin-bottom: 30px;
}

.start-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    font-size: 1.6em;
    font-weight: 700;
    padding: 18px 60px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.start-btn:hover {
    background: linear-gradient(135deg, #40A0A0 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

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

/* Test Content */
.calculation-test-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

/* Progress Bar */
.calculation-progress {
    margin-bottom: 40px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.progress-text {
    color: #1e293b;
    font-weight: 600;
}

.timer-text {
    color: #2563eb;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #40A0A0 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Question Display */
.question-area {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    margin-bottom: 40px;
}

.question-display {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 4em;
    font-weight: 300;
    color: #1e293b;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.question-display span {
    display: inline-block;
}

.operator {
    color: #2563eb;
    font-weight: 600;
}

.equals {
    color: #909090;
}

.question-mark {
    color: #2563eb;
    font-weight: 600;
}

/* Answer Grid */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.answer-btn {
    background: #2563eb;
    color: #ffffff;
    font-size: 1.8em;
    font-weight: 600;
    padding: 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.answer-btn:hover {
    background: #40A0A0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.answer-btn:active {
    transform: scale(0.98);
}

.answer-btn.correct {
    background: #27AE60 !important;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.6);
}

.answer-btn.wrong {
    background: #E74C3C !important;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.6);
}

/* Control Buttons */
.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.control-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.end-btn {
    background: #1d4ed8;
    color: #ffffff;
}

.end-btn:hover {
    background: #2563eb;
}

/* Results */
.calculation-results {
    background: #ffffff;
    border-radius: 12px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.results-content h2 {
    font-size: 2.5em;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 40px 0;
}

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

.stat-card {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.stat-number {
    font-size: 3em;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1em;
    color: #909090;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.results-message {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    margin-bottom: 30px;
}

.results-message p {
    font-size: 1.3em;
    color: #64748b;
    margin: 0;
}

.test-disclaimer {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #F39C12;
    color: #64748b;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 30px;
}

.test-disclaimer strong {
    color: #F39C12;
}

/* Info Section */
.calculation-info {
    margin-top: 40px;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
}

.calculation-info h3 {
    font-size: 1.8em;
    font-weight: 600;
    color: #1e293b!important;
    margin-bottom: 25px;
    text-align: center;
}

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

.info-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    border-top: 3px solid #2563eb;
}

.info-card h4 {
    font-size: 1.2em;
    color: #1e293b!important;
    margin: 0 0 12px 0;
}

.info-card p {
    font-size: 0.95em;
    color: #909090;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculation-test-container {
        padding: 20px 15px;
    }

    .calculation-header h2 {
        font-size: 1.6em;
    }

    .calculation-start-screen {
        padding: 40px 25px;
    }

    .start-content h3 {
        font-size: 1.6em;
    }

    .start-description {
        font-size: 1.1em;
    }

    .start-btn {
        font-size: 1.4em;
        padding: 15px 40px;
    }

    .calculation-test-content {
        padding: 25px 20px;
    }

    .question-display {
        font-size: 2.8em;
        gap: 12px;
    }

    .answer-grid {
        gap: 12px;
        max-width: 100%;
    }

    .answer-btn {
        font-size: 1.5em;
        padding: 18px;
    }

    .results-content h2 {
        font-size: 2em;
    }

    .stat-number {
        font-size: 2.5em;
    }

    .results-message p {
        font-size: 1.1em;
    }

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

@media (max-width: 480px) {
    .question-display {
        font-size: 2.2em;
        gap: 10px;
    }

    .answer-btn {
        font-size: 1.3em;
        padding: 15px;
    }

    .results-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
