:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --dark: #1b263b;
    --light: #f8f9fa;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #577590;
    --border-radius: 12px;
    --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f7ff;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 700;
}

header p {
    color: var(--info);
    font-size: 1.1rem;
}

.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    min-height: 500px;
}

.input-section {
    padding: 2rem;
    background: white;
}

.results-section {
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

input, select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9f9f9;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    background-color: white;
}

.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.radio-option input {
    width: auto;
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 1rem;
}

button:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

.results-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.results-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-title svg {
    width: 24px;
    height: 24px;
}

.macro-result {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed #eee;
}

.macro-name {
    font-weight: 500;
}

.macro-value {
    font-weight: 600;
}

.calories {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 1.5rem 0;
}

.calories-label {
    text-align: center;
    color: var(--info);
    margin-bottom: 1.5rem;
}

.macro-bars {
    margin-top: 1.5rem;
}

.macro-bar {
    height: 10px;
    border-radius: 5px;
    margin-bottom: 1rem;
    background-color: #eee;
    overflow: hidden;
}

.macro-bar-fill {
    height: 100%;
    border-radius: 5px;
}

.macro-bar-protein {
    background-color: var(--success);
    width: 0%;
}

.macro-bar-carbs {
    background-color: var(--warning);
    width: 0%;
}

.macro-bar-fat {
    background-color: var(--danger);
    width: 0%;
}

.macro-legend {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.protein-color {
    background-color: var(--success);
}

.carbs-color {
    background-color: var(--warning);
}

.fat-color {
    background-color: var(--danger);
}

.tips-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.tips-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 600;
}

.tips-list {
    list-style-type: none;
}

.tips-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.tips-list li:before {
    content: "•";
    color: var(--primary);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -3px;
}

.hidden {
    display: none;
}

.activity-levels {
    margin-top: 1rem;
}

.activity-level {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.activity-level:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}