/* ===================================
   Exponent & Logarithm Calculator
   Author: CalWhat Team
   Date: 2025-11-11
   =================================== */

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}


/* Calculator Type Tabs */
.calc-type-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calc-type-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #666;
}

.calc-type-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.calc-type-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.calc-type-btn i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Form Group */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group label i {
    color: #667eea;
    margin-right: 0.3rem;
}

/* Form Input */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

.form-input:hover {
    border-color: #c0c0c0;
}

/* Quick Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.preset-btn {
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
}

.preset-btn:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    transform: translateY(-2px);
}

.preset-btn:active {
    transform: translateY(0);
}

/* Calculator Sections */
.calculator-section {
    display: none;
}

.calculator-section.active {
    display: block;
}

/* Result Display */
.result-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    color: white;
    margin-bottom: 1.5rem;
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    word-break: break-all;
}

.result-formula {
    font-size: 1rem;
    opacity: 0.85;
    margin-top: 0.75rem;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

/* KaTeX formula responsive */
.result-formula .katex {
    font-size: 1em;
}

/* Steps Display */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.steps-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
}

.steps-list li strong {
    color: #667eea;
}

.steps-list li .katex {
    font-size: 0.95em;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .result-formula {
        font-size: 0.9rem;
    }

    .result-formula .katex {
        font-size: 0.85em;
    }

    .steps-list li {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin-top: 1rem;
}

/* Action Buttons Grid */
.action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Action Buttons */
.btn-custom,
.btn-custom-outline {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-custom-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-custom-outline:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.btn-custom:active,
.btn-custom-outline:active {
    transform: translateY(0);
}

/* Sponsor Button */
.btn-sponsor {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
}

.btn-sponsor:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-sponsor:active {
    transform: translateY(0);
}

/* FAQ Section */
.faq-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.faq-answer {
    color: #555;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .result-value {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem 0.5rem;
    }

    .page-header {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.75rem;
    }

    .calc-type-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }

    .calc-type-btn i {
        display: inline;
        margin-bottom: 0;
        margin-right: 0.5rem;
        font-size: 1.2rem;
    }

    .preset-buttons {
        grid-template-columns: repeat(4, 1fr);
    }

    .result-value {
        font-size: 1.75rem;
    }

    .chart-container {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .action-buttons-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .preset-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Print Styles */
@media print {
    .action-buttons-grid,
    .btn-custom,
    .btn-custom-outline,
    .btn-sponsor {
        display: none !important;
    }

    .glass-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
