/* Scientific Notation Calculator Styles */

/* Main container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}


.glass-card h3 {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Input section */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-group label i.fa-info-circle {
    color: #667eea;
    cursor: help;
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Courier New', monospace;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* Scientific notation display */
.notation-display {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    text-align: center;
    color: #374151;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notation-display .coefficient {
    font-weight: 700;
    color: #667eea;
}

.notation-display .exponent {
    font-size: 0.8em;
    vertical-align: super;
    color: #764ba2;
}

/* Operation buttons */
.operation-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-operation {
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-operation:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edff 100%);
    border-color: #667eea;
    transform: translateY(-2px);
}

.btn-operation.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.btn-operation i {
    font-size: 1.1rem;
}

/* Significant figures slider */
.sig-figs-control {
    margin-bottom: 1rem;
}

.sig-figs-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    outline: none;
    -webkit-appearance: none;
}

.sig-figs-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sig-figs-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sig-figs-value {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

/* Result section */
.result-item {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.result-item-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-item-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #374151;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

/* Chart container */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin-top: 1rem;
}

/* Formula explanation */
.formula-section {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-left: 4px solid #f6ad55;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.formula-section h4 {
    color: #c05621;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.formula-content {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #7c2d12;
    line-height: 1.6;
}

.formula-step {
    margin-bottom: 0.5rem;
    padding-left: 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);
}

/* Unit prefix info */
.unit-prefix-info {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #166534;
}

.unit-prefix-info code {
    background: rgba(22, 101, 52, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

/* Keyboard shortcuts hint */
.keyboard-shortcuts {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #78350f;
}

.keyboard-shortcuts kbd {
    background: white;
    border: 1px solid #d97706;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-family: monospace;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 4px rgba(217, 119, 6, 0.1);
}

/* Responsive Design */

/* Tablet (576px - 992px) */
@media (max-width: 992px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .operation-buttons {
        grid-template-columns: repeat(3, 1fr);
    }

    .chart-container {
        height: 250px;
    }
}

/* Mobile (<576px) */
@media (max-width: 576px) {
    .main-container {
        padding: 1rem 0.5rem;
    }

    .page-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .page-header .subtitle {
        font-size: 0.95rem;
    }

    .glass-card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .glass-card h3 {
        font-size: 1.1rem;
    }

    .form-input {
        padding: 0.85rem;
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 48px;
    }

    .operation-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .btn-operation {
        padding: 0.85rem 0.5rem;
        font-size: 0.9rem;
    }

    .action-buttons-grid {
        grid-template-columns: 1fr;
    }

    .result-item-value {
        font-size: 1.1rem;
    }

    .chart-container {
        height: 220px;
    }

    .seo-section {
        padding: 1.5rem;
        margin: 2rem auto 1rem;
    }

    .seo-section h2 {
        font-size: 1.4rem;
    }

    .seo-section h3 {
        font-size: 1.2rem;
    }

    .seo-section p,
    .seo-section ol,
    .seo-section ul {
        font-size: 0.95rem;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .btn-operation,
    .btn-custom,
    .btn-custom-outline,
    .btn-sponsor {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Print styles */
@media print {
    .action-buttons-grid,
    .keyboard-shortcuts {
        display: none;
    }

    .glass-card {
        break-inside: avoid;
    }
}
