/* Math Fact Sheet Specific Styles */

/* Controls Panel */
.controls-panel {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 3px solid #b8d4ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.control-section {
    margin-bottom: 20px;
}

.control-section:last-child {
    margin-bottom: 0;
    text-align: center;
}

.control-section h3 {
    color: #5a67d8;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Operation Buttons */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.operation-btn {
    flex: 1;
    min-width: 140px;
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border: 3px solid #cbd5e0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.operation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.operation-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #5a67d8;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Number Settings */
.number-settings {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.number-settings label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: bold;
    color: #2d3748;
    flex: 1;
    min-width: 180px;
}

.number-settings input[type="number"] {
    padding: 10px;
    font-size: 1.1em;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.number-settings input[type="number"]:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
}

/* Primary Button */
.primary-btn {
    padding: 15px 40px;
    font-size: 1.3em;
    font-weight: bold;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
    font-family: inherit;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.6);
}

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

/* Worksheet Area */
.worksheet-area {
    background: #fafafa;
    border: 3px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
}

/* Worksheet Header */
.worksheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Timer Display */
.timer-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
    color: #2d3748;
}

.timer-label {
    color: #718096;
}

.timer-value {
    color: #5a67d8;
    font-family: 'Courier New', monospace;
    background: #f0f4ff;
    padding: 8px 16px;
    border-radius: 8px;
}

.timer-btn {
    padding: 8px 20px;
    font-size: 0.7em;
    font-weight: bold;
    background: linear-gradient(135deg, #5a67d8 0%, #4c51bf 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(90, 103, 216, 0.3);
    font-family: inherit;
}

.timer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.5);
}

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

.timer-btn.paused {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

.timer-btn.paused:hover {
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.5);
}

/* Check Button */
.check-btn {
    padding: 12px 35px;
    font-size: 1.2em;
    font-weight: bold;
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
    font-family: inherit;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 137, 54, 0.6);
}

/* Score Display */
.score-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
}

.score-display.hidden {
    display: none;
}

.score-label {
    color: #718096;
}

.score-value {
    color: #48bb78;
    background: #f0fff4;
    padding: 8px 16px;
    border-radius: 8px;
}

/* Questions Grid */
.questions-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(10, 1fr);
}

.question-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.question-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-text {
    font-size: 1.1em;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 10px;
}

.answer-input {
    width: 100%;
    padding: 10px;
    font-size: 1.1em;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    text-align: center;
    font-family: inherit;
    font-weight: bold;
    transition: all 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: #5a67d8;
    box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.2);
    background: #f0f4ff;
}

/* Result Icons */
.result-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.5em;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.question-item.correct {
    border-color: #48bb78;
    background: #f0fff4;
}

.question-item.correct .result-icon {
    color: #48bb78;
    opacity: 1;
}

.question-item.incorrect {
    border-color: #f56565;
    background: #fff5f5;
    animation: shake 0.5s ease;
}

.question-item.incorrect .result-icon {
    color: #f56565;
    opacity: 1;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .questions-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .questions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .operation-btn {
        min-width: 100%;
    }
    
    .worksheet-header {
        flex-direction: column;
        text-align: center;
    }
    
    .number-settings {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .questions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .question-text {
        font-size: 0.9em;
    }
    
    .answer-input {
        font-size: 1em;
        padding: 8px;
    }
}
