:root {
    --cp-primary: #00B050;
    --cp-secondary: #4CAF50;
    --cp-dark: #222222;
    --cp-gray: #4A4A4A;
    --cp-light-gray: #CCCCCC;
    --cp-bg-soft: #F9F9F9;
    --cp-bg-white: #FFFFFF;
    --cp-border-radius: 12px;
    --cp-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --cp-shadow-hover: 0 15px 40px rgba(0,0,0,0.1);
}

.cp-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--cp-dark);
}

/* --- Cards & Structure --- */
.cp-card {
    background: var(--cp-bg-white);
    padding: 30px;
    border-radius: var(--cp-border-radius);
    box-shadow: var(--cp-shadow);
    margin-bottom: 30px;
}

.cp-title {
    color: var(--cp-primary);
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.cp-subtitle {
    text-align: center;
    color: var(--cp-gray);
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* --- Form Elements --- */
.cp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cp-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.cp-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--cp-dark);
}

.cp-input-group input,
.cp-input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    font-size: 16px;
    background: var(--cp-bg-soft);
    transition: all 0.3s ease;
}

.cp-input-group input:focus,
.cp-input-group select:focus {
    border-color: var(--cp-primary);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 176, 80, 0.1);
}

.cp-btn-primary {
    width: 100%;
    background-color: var(--cp-primary);
    color: white;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cp-btn-primary:hover {
    background-color: var(--cp-secondary);
    transform: translateY(-2px);
}

/* --- Results Section --- */
.cp-results-container {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.cp-section-header h3 {
    border-left: 5px solid var(--cp-primary);
    padding-left: 15px;
    color: var(--cp-dark);
    margin: 40px 0 20px 0;
}

/* Stats Cards */
.cp-stat-card {
    padding: 20px;
    border-radius: var(--cp-border-radius);
    text-align: center;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.cp-stat-card.primary { border-top: 4px solid var(--cp-primary); }
.cp-stat-card.secondary { border-top: 4px solid var(--cp-secondary); }
.cp-stat-card.gray { border-top: 4px solid var(--cp-gray); }

.cp-stat-card .cp-label {
    display: block;
    font-size: 0.9em;
    color: var(--cp-gray);
    margin-bottom: 5px;
    font-weight: 600;
}

.cp-stat-card .cp-value {
    font-size: 1.8em;
    font-weight: 800;
    color: var(--cp-dark);
    line-height: 1.2;
    margin-bottom: 5px;
}

.cp-stat-card .cp-sub {
    font-size: 0.8em;
    color: #888;
}

/* Breakdown & Info */
.cp-info-card {
    background: var(--cp-bg-soft);
    padding: 20px;
    border-radius: var(--cp-border-radius);
}

.cp-info-card h4 {
    margin-top: 0;
    color: var(--cp-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cp-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.cp-list li:last-child { border-bottom: none; }

/* Food Recommendations */
.cp-food-card {
    background: white;
    border-radius: var(--cp-border-radius);
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #eee;
}

.cp-food-card h4 {
    margin-top: 0;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.cp-food-card ul {
    list-style: none;
    padding: 0;
}

.cp-food-card ul li {
    padding: 5px 0;
    position: relative;
    padding-left: 20px;
}

.cp-food-card ul li:before {
    content: "•";
    color: var(--cp-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Meal Plan */
.cp-meal-plan-container {
    background: white;
    border-radius: var(--cp-border-radius);
    overflow: hidden;
    box-shadow: var(--cp-shadow);
}

.cp-meal-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
}

.cp-meal-row:last-child { border-bottom: none; }

.meal-time {
    width: 30%;
    background: var(--cp-bg-soft);
    padding: 20px;
    font-weight: 700;
    color: var(--cp-gray);
    display: flex;
    align-items: center;
    border-right: 1px solid #f0f0f0;
}

.meal-content {
    width: 70%;
    padding: 20px;
    color: var(--cp-dark);
}

/* Guidance Alert */
.cp-alert-box {
    background: #e8f5e9;
    border-left: 4px solid var(--cp-primary);
    padding: 20px;
    margin-top: 30px;
    border-radius: 4px;
    color: #2e7d32;
}

/* Content & FAQ */
.cp-content-section {
    margin-top: 50px;
    padding: 20px;
    background: #fff;
    border-radius: var(--cp-border-radius);
}

.cp-faq-section {
    margin-top: 30px;
}

.cp-accordion-item {
    background: white;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    overflow: hidden;
}

.cp-accordion-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--cp-dark);
}

.cp-accordion-btn:hover {
    background: var(--cp-bg-soft);
}

.cp-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 20px;
    background: #fafafa;
}

.cp-accordion-content.active {
    padding: 15px 20px;
    max-height: 300px; /* Arbitrary large height */
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cp-grid-2, .cp-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .cp-meal-row {
        flex-direction: column;
    }
    
    .meal-time, .meal-content {
        width: 100%;
    }
    
    .meal-time {
        padding: 10px 20px;
        background: var(--cp-primary);
        color: white;
    }
}