/* Global Styles */
:root {
    --primary-color: #4a6fa5;
    --primary-light: #6a8cc9;
    --primary-dark: #345284;
    --accent-color: #ff9800;
    --accent-light: #ffb74d;
    --accent-dark: #f57c00;
    --text-dark: #333;
    --text-light: #f8f9fa;
    --bg-light: #f8f9fa;
    --bg-dark: #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --border-radius: 8px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: none;
}

.btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: var(--text-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn.secondary:hover {
    background-color: var(--gray-100);
    transform: translateY(-2px);
}

.btn.text {
    background: none;
    color: var(--primary-color);
    padding: 8px 0;
}

.btn.text:hover {
    color: var(--primary-dark);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--gray-200) 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    flex: 1;
    height: 350px;
}

.stat-visual {
    width: 100%;
    height: 100%;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
}

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: var(--text-light);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Sample Calculations Section */
.sample-calculations {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.calculator-demo {
    display: flex;
    gap: 2rem;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.demo-input, .demo-results {
    flex: 1;
}

.demo-input textarea {
    width: 100%;
    height: 100px;
    margin: 1rem 0;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: inherit;
    resize: vertical;
}

.demo-results p {
    margin-bottom: 0.5rem;
}

/* Statistics Calculator Page */
.calculator-section {
    padding: 2rem 0;
}

.calculator-container {
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: inherit;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.results-container {
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.result-card {
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.result-label {
    font-weight: 500;
}

.steps-container {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.step {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
}

.step-number {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Tooltip Styles */
.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-light);
    font-size: 12px;
    cursor: pointer;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    padding: 1rem;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    display: none;
}

.tooltip-container:hover .tooltip-content {
    display: block;
}

.tooltip-content h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tooltip-content p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.formula {
    padding: 0.5rem;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
    margin: 0.5rem 0;
    font-family: "Courier New", monospace;
}

/* Visualization Page */
.chart-container {
    height: 400px;
    background-color: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1rem;
    margin-bottom: 2rem;
}

.chart-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.chart-type-selector {
    display: flex;
    gap: 0.5rem;
}

.chart-type-selector button {
    background-color: var(--text-light);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.chart-type-selector button.active {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .hero-image {
        height: 250px;
    }
    
    .calculator-demo {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}