@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

#ccWrap {
    font-family: 'Inter', sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

/* Unit Toggle */
.cc-unit-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.cc-unit-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.cc-unit-btn.active {
    background: #ffffff;
    color: #6366f1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Section */
.cc-section {
    margin-bottom: 22px;
}

.cc-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

/* Gender Buttons */
.cc-gender-btns,
.cc-goal-btns {
    display: flex;
    gap: 12px;
}

.cc-gender-btn,
.cc-goal-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.cc-gender-btn.active,
.cc-goal-btn.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #6366f1;
}

.cc-gender-btn:hover,
.cc-goal-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* Input Row */
.cc-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cc-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    transition: border 0.3s;
    font-family: 'Inter', sans-serif;
}

.cc-input:focus {
    border-color: #6366f1;
}

.cc-unit-label {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    min-width: 30px;
}

/* Select */
.cc-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: border 0.3s;
    background: #ffffff;
}

.cc-select:focus {
    border-color: #6366f1;
}

/* Calculate Button */
.cc-calc-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.cc-calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99,102,241,0.4);
}

/* Hidden */
.cc-hidden {
    display: none !important;
}

/* Results */
.cc-results {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Result Cards */
.cc-result-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
    transition: transform 0.3s;
}

.cc-result-card:hover {
    transform: translateY(-2px);
}

.cc-bmr-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
}

.cc-tdee-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
}

.cc-goal-card {
    background: linear-gradient(135deg, #fdf4ff, #fae8ff);
    border: 1px solid #e9d5ff;
}

.cc-result-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.7);
    border-radius: 14px;
    flex-shrink: 0;
}

.cc-result-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.cc-result-value {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 4px;
}

.cc-result-sub {
    font-size: 12px;
    color: #94a3b8;
}

/* Macro Section */
.cc-macro-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
}

.cc-macro-title,
.cc-table-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.cc-macro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cc-macro-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.cc-macro-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.cc-macro-value {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
}

.cc-macro-bar-wrap {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.cc-macro-bar {
    height: 100%;
    border-radius: 3px;
    width: 0%;
    transition: width 1s ease;
}

.cc-protein-bar { background: linear-gradient(90deg, #6366f1, #8b5cf6); }
.cc-carbs-bar { background: linear-gradient(90deg, #f59e0b, #f97316); }
.cc-fats-bar { background: linear-gradient(90deg, #10b981, #059669); }

.cc-macro-pct {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

/* Table */
.cc-table-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
}

.cc-table {
    width: 100%;
    border-collapse: collapse;
}

.cc-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
}

.cc-table td {
    padding: 12px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
}

.cc-table tr:last-child td {
    border-bottom: none;
}

.cc-table tr.cc-active-row td {
    font-weight: 700;
    color: #6366f1;
    background: #eef2ff;
}

.cc-table td:last-child {
    font-weight: 700;
    color: #1e293b;
    text-align: right;
}

/* Responsive */
@media (max-width: 480px) {
    #ccWrap { padding: 20px; }
    .cc-macro-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .cc-result-value { font-size: 26px; }
    .cc-gender-btns, .cc-goal-btns { flex-direction: column; }
}
