/* Calculator Common Styles Library */

/* Color Schemes */
:root {
    /* Financial Theme */
    --financial-primary: #2E5339;
    --financial-secondary: #1B365D;
    --financial-accent: #FFD700;
    --financial-gradient: linear-gradient(135deg, #2E5339 0%, #1B365D 100%);
    --financial-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Math Theme */
    --math-primary: #6366f1;
    --math-secondary: #8b5cf6;
    --math-accent: #06b6d4;
    --math-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --math-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Health Theme */
    --health-primary: #059669;
    --health-secondary: #0d9488;
    --health-accent: #f59e0b;
    --health-gradient: linear-gradient(135deg, #059669 0%, #0d9488 100%);
    --health-bg: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    /* General Theme */
    --general-primary: #3b82f6;
    --general-secondary: #1e40af;
    --general-accent: #f59e0b;
    --general-gradient: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --general-bg: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    
    /* Technical Theme */
    --tech-primary: #7c3aed;
    --tech-secondary: #5b21b6;
    --tech-accent: #06b6d4;
    --tech-gradient: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    --tech-bg: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography */
.calculator-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    min-height: 100vh;
    padding: 20px;
}

/* Container Styles */
.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Header Styles */
.calculator-header {
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.calculator-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

.calculator-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.calculator-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Main Content Layout */
.calculator-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

/* Section Styles */
.calculator-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #34495e;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.calculate-button {
    width: 100%;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Result Styles */
.result-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 5px;
    font-weight: 500;
}

.result-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Footer Styles */
.calculator-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

.calculator-footer a {
    color: #3498db;
    text-decoration: none;
}

.calculator-footer a:hover {
    text-decoration: underline;
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .calculator-header h1 {
        font-size: 2rem;
    }
    
    .calculator-body {
        padding: 10px;
    }
}

/* Theme Classes */
.theme-financial {
    background: var(--financial-bg);
}

.theme-financial .calculator-header {
    background: var(--financial-gradient);
}

.theme-financial .section-title {
    color: var(--financial-primary);
}

.theme-financial .form-input:focus {
    border-color: var(--financial-primary);
    box-shadow: 0 0 0 3px rgba(46, 83, 57, 0.1);
}

.theme-financial .calculate-button {
    background: var(--financial-gradient);
}

.theme-financial .result-item {
    border-left-color: var(--financial-primary);
}

.theme-financial .result-value {
    color: var(--financial-primary);
}

.theme-financial .spinner {
    border-top-color: var(--financial-primary);
}

.theme-math {
    background: var(--math-bg);
}

.theme-math .calculator-header {
    background: var(--math-gradient);
}

.theme-math .section-title {
    color: var(--math-primary);
}

.theme-math .form-input:focus {
    border-color: var(--math-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.theme-math .calculate-button {
    background: var(--math-gradient);
}

.theme-math .result-item {
    border-left-color: var(--math-primary);
}

.theme-math .result-value {
    color: var(--math-primary);
}

.theme-math .spinner {
    border-top-color: var(--math-primary);
}

.theme-health {
    background: var(--health-bg);
}

.theme-health .calculator-header {
    background: var(--health-gradient);
}

.theme-health .section-title {
    color: var(--health-primary);
}

.theme-health .form-input:focus {
    border-color: var(--health-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.theme-health .calculate-button {
    background: var(--health-gradient);
}

.theme-health .result-item {
    border-left-color: var(--health-primary);
}

.theme-health .result-value {
    color: var(--health-primary);
}

.theme-health .spinner {
    border-top-color: var(--health-primary);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }

.p-10 { padding: 10px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
