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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header-content i {
    font-size: 60px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.95;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Calculator Card */
.calculator-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.section-header i {
    font-size: 28px;
    color: var(--primary-color);
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Input Groups */
.inputs-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.input-group {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.input-group:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.input-group label i {
    color: var(--primary-color);
    font-size: 20px;
}

.input-controls {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 15px;
    align-items: center;
}

.number-input {
    padding: 12px 16px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.number-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Slider Styles */
.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    transition: all 0.3s ease;
}

.slider:hover {
    background: #cbd5e1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-dark);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-dark);
}

.value-display {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 100px;
    text-align: right;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 15px;
}

.day-button {
    flex: 1;
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.day-button:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.day-button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Results Container */
.results-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

.result-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.result-item.daily {
    background: rgba(255, 255, 255, 0.9);
}

.result-item.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 3px solid #f59e0b;
}

.result-item.impact {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 3px solid #ef4444;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0);
    }
}

.result-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.result-label i {
    font-size: 20px;
    color: var(--primary-color);
}

.result-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.result-value.large {
    font-size: 2.8rem;
    color: #d97706;
}

.result-value.extra-large {
    font-size: 3.5rem;
    color: #dc2626;
}

.result-subtext {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 500;
}

.result-subtext.emphasis {
    font-size: 1.1rem;
    font-weight: 700;
    color: #991b1b;
}

.result-subtext span {
    font-weight: 700;
    color: var(--primary-color);
}

.result-divider {
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    margin: 20px 0;
}

/* CTA Section */
.cta-section {
    background: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-top: 30px;
}

.cta-icon {
    font-size: 50px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.cta-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.cta-section p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.btn {
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn i {
    font-size: 18px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.btn-tertiary {
    background: var(--warning-color);
    color: white;
}

.btn-tertiary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(245, 158, 11, 0.3);
}

.btn-reset {
    background: var(--text-secondary);
    color: white;
}

.btn-reset:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* PDF Styles - Optimized for single page */
#pdfContent {
    display: none;
}

.pdf-wrapper {
    padding: 25px 35px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 750px;
    max-width: 750px;
    background: white;
    box-sizing: border-box;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.pdf-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

.pdf-header h1 {
    font-size: 1.6rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 800;
}

.pdf-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.pdf-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.pdf-inputs, .pdf-results {
    margin-bottom: 20px;
}

.pdf-inputs h2, .pdf-results h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-weight: 700;
}

.pdf-input-item, .pdf-result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: var(--bg-color);
    border-radius: 6px;
}

.pdf-result-item.highlight {
    background: #fef3c7;
    font-weight: 600;
}

.pdf-result-item.impact {
    background: #fee2e2;
    font-weight: 700;
    border: 2px solid #ef4444;
}

.pdf-label, .pdf-result-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.pdf-value, .pdf-result-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.pdf-result-value.large {
    font-size: 1.4rem;
    color: #dc2626;
}

.pdf-footer {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.pdf-footer h2 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.pdf-footer p {
    line-height: 1.5;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.pdf-cta {
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 12px;
}

/* PDF Contact Section */
.pdf-contact {
    margin-top: 25px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
    border: none;
}

.pdf-contact-info {
    color: white;
}

.company-name {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.pdf-contact-info h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.pdf-contact-info p {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 8px 0;
    line-height: 1.8;
}

.contact-phone {
    color: white;
}

.contact-email {
    color: white;
}

.contact-website {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .calculator-card {
        padding: 25px;
        border-radius: 16px;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .input-controls {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .value-display {
        text-align: left;
        font-size: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .results-container {
        padding: 25px;
    }

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

    .result-value.large {
        font-size: 2rem;
    }

    .result-value.extra-large {
        font-size: 2.5rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .header-content i {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 20px;
    }

    .input-group {
        padding: 20px;
    }

    .result-value.extra-large {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .calculator-card {
        box-shadow: none;
    }

    .action-buttons {
        display: none;
    }
}
