
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    min-height: 100vh;
    color: white;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.card {
    width: 100%;
    max-width: 768px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(255, 165, 0, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.icon-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.icon {
    padding: 1rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6500 50%, #ff4500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(255, 140, 0, 0.4);
}

.calculator-icon {
    width: 32px;
    height: 32px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}

.title {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.label {
    display: block;
    color: white;
    font-weight: 500;
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.input {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.125rem;
    background: #fff3e0;
    border: 2px solid transparent;
    border-radius: 6px;
    color: black;
    height: 48px;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.input.error {
    border-color: #ef4444;
    background: #fecaca;
}

.input.success {
    border-color: #ff8c00;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-input {
    width: 16px;
    height: 16px;
    accent-color: #ff8c00;
}

.radio-label {
    color: white;
    cursor: pointer;
}

.select {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.125rem;
    background: #fff3e0;
    border: 2px solid transparent;
    border-radius: 6px;
    color: black;
    height: 48px;
    cursor: pointer;
    transition: all 0.2s;
}

.select:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

.button {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ff8c00 0%, #ff6500 50%, #ff4500 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    height: 56px;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.4);
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.results-container {
    padding: 1rem;
}

.results-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-info {
    color: #ffcc80;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.back-button {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6500 50%, #ff4500 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.back-button:hover {
    transform: translateY(-1px);
}

.results-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-title {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.results-subtitle {
    color: #ffcc80;
    margin-bottom: 1.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.result-item {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6500 100%);
    box-shadow: 0 10px 30px rgba(255, 140, 0, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    color: white;
    transition: transform 0.2s;
}

.result-item:hover {
    transform: translateY(-2px);
}

.result-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.result-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.result-description {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.3;
}

.macros-section {
    margin-bottom: 2rem;
}

.macros-title {
    color: white;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.goal-badge {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6500 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 600;
    width: max-content;
}

.goal-description {
    color: white;
    margin-bottom: 1rem;
}

.diet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.diet-card {
    background: rgba(255, 140, 0, 0.1);
    border: 1px solid rgba(255, 140, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.diet-card:hover {
    background: rgba(255, 140, 0, 0.15);
    transform: translateY(-2px);
}

.diet-title {
    color: #ff8c00;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.macro-row {
    display: flex;
    justify-content: space-between;
    color: white;
    margin-bottom: 0.5rem;
}

.macro-value {
    font-weight: bold;
    color: #ff8c00;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.print-button {
    background: transparent;
    border: 2px solid #ff8c00;
    color: #ff8c00;
    padding: 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    height: 56px;
    transition: all 0.2s;
}

.print-button:hover {
    background: #ff8c00;
    color: white;
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

/* Mobile adaptations */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-value {
        font-size: 1.8rem;
    }
    
    .diet-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        padding: 1rem;
    }
    
    .results-info {
        font-size: 1rem;
    }
    
    .title {
        font-size: 1.25rem;
    }

    .goal-badge{
        margin-left: auto;
        margin-right: auto;
    }

    .goal-description{
        text-align: center;
    }
}

@media (max-width: 640px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
}

/* Ensure main results fit in desktop */
@media (min-width: 769px) {
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .result-value {
        font-size: 1.8rem;
    }
    
    .result-description {
        font-size: 0.8rem;
    }
}
