/* ============================================
   LinearEquationCalculator.css
   直線方程式計算器 - 樣式表
   ============================================
   注意：本文件僅定義計算器特定樣式
   全域樣式已在 layout.css 定義（.glass-card, .form-input, .btn-custom等）
   請勿重新定義全域類別！
   ============================================ */

/* ============================================
   計算模式選擇標籤
   ============================================ */
.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mode-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #666;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mode-tab:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.mode-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mode-tab i {
    margin-right: 5px;
}

/* ============================================
   輸入區域
   ============================================ */
.input-section {
    display: none;
}

.input-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.input-group-custom {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #555;
    font-family: 'Poppins', sans-serif;
}

.input-label i {
    margin-right: 5px;
    color: #667eea;
}

/* 輸入提示文字 */
.input-hint {
    font-size: 0.8rem;
    color: #999;
    margin-top: -5px;
    font-style: italic;
}

/* ============================================
   結果顯示區域
   ============================================ */
.result-item {
    margin-bottom: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.15);
}

.result-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

.result-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
    font-family: 'Roboto Mono', monospace;
}

/* 關鍵結果高亮 */
.result-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.result-highlight .result-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.result-highlight .result-value {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ============================================
   計算步驟顯示
   ============================================ */
.calculation-steps {
    margin-top: 15px;
}

.calculation-step {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: white;
    border-radius: 10px;
    border-left: 3px solid #48bb78;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #444;
    transition: all 0.3s ease;
}

.calculation-step:hover {
    background: #f8fff8;
    transform: translateX(5px);
}

.calculation-step .step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.calculation-step .step-formula {
    color: #667eea;
    font-weight: 500;
}

/* ============================================
   圖表容器
   ============================================ */
.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 12px;
}

/* ============================================
   錯誤訊息
   ============================================ */
.error-message {
    padding: 12px 15px;
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 10px;
    color: #c53030;
    font-size: 0.9rem;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message i {
    font-size: 1.2rem;
}

/* ============================================
   警告訊息
   ============================================ */
.warning-message {
    padding: 12px 15px;
    background: #fffaf0;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    color: #d97706;
    font-size: 0.9rem;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-message i {
    font-size: 1.2rem;
}

/* ============================================
   動畫
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   響應式設計
   ============================================ */
@media (max-width: 768px) {
    .mode-tabs {
        flex-direction: column;
    }

    .mode-tab {
        width: 100%;
        min-width: auto;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-value {
        font-size: 1.1rem;
    }

    .result-highlight .result-value {
        font-size: 1.5rem;
    }

    .chart-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .result-value {
        font-size: 1rem;
    }

    .result-highlight .result-value {
        font-size: 1.3rem;
    }

    .calculation-step {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    .chart-container {
        height: 250px;
    }
}
