/* Custom Fonts & Roots - Fiery Theme */
:root {
    --bg-color: #1e1b4b;
    /* Deep violet night sky */
    --card-bg: rgba(49, 46, 129, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;

    --primary: #f97316;
    /* Orange */
    --primary-hover: #ea580c;
    --accent: #f59e0b;
    /* Amber */

    --cut-color: #0ea5e9;
    /* Sky Blue for cutting */
    --bulk-color: #ef4444;
    /* Red for bulking */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 1rem;
}

.back-home-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
    z-index: 10;
}

.back-home-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Ambient Background Blobs */
.blob-bg {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s ease-in-out infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.4), transparent 70%);
    animation-delay: -2s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(20px) scale(1.05);
    }
}

/* App Container */
.app-container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    margin-top: 3rem;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-header .logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 16px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.3);
}

.app-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

.highlight {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.app-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Panels */
.calculator-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all 0.4s ease;
}

.result-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    animation: slideUp 0.5s ease;
}

.hidden {
    display: none !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inputs Groups */
.input-group {
    background: rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.input-group>label {
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
}

.value-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.value-display small {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Gender Buttons */
.gender-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.gender-btn {
    flex: 1;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.gender-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.gender-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

/* Select Box */
.custom-select-wrapper {
    margin-top: 0.75rem;
}

.custom-select {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: white;
    font-size: 0.95rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

/* Custom Slider */
.custom-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: background 0.3s;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    border: 4px solid var(--primary);
    transition: transform 0.1s;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(249, 115, 22, 0.5);
}

.secondary-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-align: center;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Result Area */
.result-hero {
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    padding: 2rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(249, 115, 22, 0.2);
    box-shadow: inset 0 0 20px rgba(249, 115, 22, 0.05);
}

.result-hero h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.tdee-score {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.tdee-score small {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.result-hero p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Macros Targets */
.calorie-targets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.target-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.target-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.target-card.cut::before {
    background: var(--cut-color);
}

.target-card.bulk::before {
    background: var(--bulk-color);
}

.target-icon {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.target-card.cut .target-icon {
    color: var(--cut-color);
}

.target-card.bulk .target-icon {
    color: var(--bulk-color);
}

.target-card h5 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.target-val {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.target-card span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bmr-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

/* Footer SEO text */
.seo-footer {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.seo-footer p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}