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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0F172A;
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

.calculator-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.fitness-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-divider {
    grid-column: 1 / -1;
    text-align: center;
    margin: 20px 0 10px;
    padding: 15px 0;
    border-top: 2px dashed #e0e0e0;
    border-bottom: 2px dashed #e0e0e0;
}

.form-divider span {
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    background: white;
    padding: 0 15px;
}

.optional-label {
    font-size: 0.75rem;
    color: #999;
    font-weight: normal;
    font-style: italic;
}

.calculate-btn {
    grid-column: 1 / -1;
    padding: 15px 30px;
    background: #F97316;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
    background: #EA580C;
}

.calculate-btn:active {
    transform: translateY(0);
}

.results {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.results.hidden {
    display: none;
}

.results h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.metric-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.metric-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.metric-unit {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.metric-category {
    font-size: 1.1rem;
    font-weight: 600;
    color: #764ba2;
    margin-bottom: 10px;
}

.metric-description {
    font-size: 0.85rem;
    color: #777;
    margin-top: 10px;
}

.reset-btn {
    display: block;
    margin: 30px auto 0;
    padding: 12px 30px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.detailed-results {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.detailed-results.hidden {
    display: none;
}

.detailed-results h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2rem;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.breakdown-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
    text-align: center;
}

.breakdown-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.breakdown-unit {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.breakdown-percentage {
    font-size: 1rem;
    color: #764ba2;
    font-weight: 600;
    margin-top: 5px;
}

.breakdown-goal {
    font-size: 0.9rem;
    color: #2ecc71;
    font-weight: 600;
    margin-top: 5px;
    text-transform: capitalize;
}

.macros-section {
    margin-bottom: 40px;
}

.macros-section h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.8rem;
}

.macros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.macro-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.macro-card.protein {
    border-color: #e74c3c;
}

.macro-card.fat {
    border-color: #f39c12;
}

.macro-card.carb {
    border-color: #3498db;
}

.macro-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.macro-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.macro-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #333;
}

.macro-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.macro-card.protein .macro-value {
    color: #e74c3c;
}

.macro-card.fat .macro-value {
    color: #f39c12;
}

.macro-card.carb .macro-value {
    color: #3498db;
}

.macro-unit {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
}

.macro-kcal {
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
}

.chart-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.chart-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.chart-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.projection-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e0e0e0;
}

.projection-section h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.projection-note {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.projection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.projection-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.projection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.projection-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.projection-card h4 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.projection-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.projection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.projection-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.projection-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.projection-unit {
    font-size: 0.85rem;
    color: #888;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .calculator-section {
        padding: 25px;
    }

    .fitness-form {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .breakdown-grid {
        grid-template-columns: 1fr;
    }

    .macros-grid {
        grid-template-columns: 1fr;
    }

    .chart-container {
        max-width: 100%;
    }

    .projection-grid {
        grid-template-columns: 1fr;
    }
}

