/* TrueForm Base CSS */

/* --- Theming & Variables --- */
:root {
    --bg-color: #0b0b0b;
    --text-color: #ffffff;
    --text-muted: #bababa;
    --accent-yellow: #d4ff00;
    --accent-purple: #9c89eb;
    --card-bg: #1a1a1a;
    --nav-bg: #f5f5f5;
    --font-primary: 'Poppins', sans-serif;
}

/* --- Global Reset --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

/* --- App Container (Mobile Constraints) --- */
#app-container {
    width: 100%;
    max-width: 480px;
    background-color: var(--bg-color);
    position: relative;
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Screen Transitions --- */
.screen {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* =========================================
   01 - LOADING SCREEN
   ========================================= */
#screen-loading,
#screen-directional {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.loading-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.loading-content h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.loading-content p {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-muted);
}

.loading-footer {
    width: 100%;
    padding-bottom: 3rem;
}

.btn-primary {
    background-color: #f7f7f7;
    color: #0b0b0b;
    border: none;
    padding: 1.1rem 2rem;
    font-size: 1.1rem;
    font-weight: 800;
    border-radius: 12px;
    width: 100%;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: transform 0.1s;
}

.btn-primary:active {
    transform: scale(0.97);
}

.directional-footer {
    width: 100%;
    padding: 0 2rem 3rem 2rem;
    display: flex;
    flex-direction: column;
}

/* =========================================
   09 - HOME SCREEN
   ========================================= */
.header-top-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
}

.btn-back-header {
    justify-self: flex-start;
    background-color: var(--accent-yellow);
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 800;
    color: #000;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: transform 0.1s;
}

.btn-back-header:active {
    transform: scale(0.97);
}

.home-header {
    text-align: center;
    padding: 1.5rem 1rem 0.5rem;
}

.home-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.home-content {
    padding: 1rem 1.5rem;
    padding-bottom: 7rem;
}

/* Welcome Banner */
.welcome-banner {
    background-color: var(--accent-yellow);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
    padding: 1.5rem;
    color: #000;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.welcome-text h3 {
    font-weight: 800;
    font-size: 1.45rem;
    line-height: 1.2;
}

.nutrition-link {
    font-size: 0.75rem;
    font-weight: 800;
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 0.3rem;
    letter-spacing: 0.5px;
}

/* Today's Menu */
.section-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.meal-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.meal-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    animation: floatUp 0.5s ease-out forwards;
}

.meal-card:nth-child(1) { animation-delay: 0.1s; }
.meal-card:nth-child(2) { animation-delay: 0.2s; }
.meal-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes floatUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.meal-img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.meal-info h4 {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.meal-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 500;
}

/* Help Center */
.help-center-card {
    background-color: var(--accent-purple);
    border-radius: 16px;
    padding: 1.5rem;
    color: #000;
}

.help-center-card h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.help-links {
    list-style: none;
}

.help-links li {
    margin-bottom: 1rem;
}

.help-links a {
    color: #000;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   BOTTOM NAVIGATION
   ========================================= */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 1rem 0 1.5rem 0;
    z-index: 100;
}

.bottom-nav .nav-item {
    font-size: 2.2rem;
    color: #000;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav .nav-item.active {
    color: var(--accent-yellow);
    background-color: #000;
    border-radius: 14px;
    padding: 0.6rem 1.2rem;
}

/* =========================================
   09A - DETAILED MEAL PAGE
   ========================================= */
.detail-content {
    padding: 1rem 1.5rem;
    padding-bottom: 7rem;
}

.btn-back {
    background-color: var(--accent-yellow);
    border: none;
    border-radius: 12px;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    font-weight: 800;
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    font-family: var(--font-primary);
    margin-bottom: 1.5rem;
}

.detail-card {
    background-color: var(--accent-purple);
    border-radius: 16px;
    padding: 1.5rem;
    color: #000;
    margin-bottom: 2rem;
    text-align: center;
}

.main-detail h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.detail-img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.instructions-section {
    text-align: center;
    margin-bottom: 2rem;
}

.instructions-section h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.instructions-section h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: left;
}

.instructions-section ol {
    text-align: left;
    margin-bottom: 1.5rem;
    padding-left: 1.2rem;
}

.instructions-section li {
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.nutrition-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
}

.nutrition-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.nutrition-row span:first-child {
    font-weight: 800;
}

.ingredients-section {
    text-align: center;
}

.ingredients-section h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.ingredients-section p {
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.allergens {
    font-weight: 700 !important;
}

/* =========================================
   03 - SIGN UP
   ========================================= */
.signup-content {
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 5rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.signup-form {
    width: 100%;
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    padding: 1.2rem;
    font-family: var(--font-primary);
    font-size: 1.05rem;
    color: #0b0b0b;
    font-weight: 600;
}

.btn-signup {
    background-color: var(--accent-yellow);
    color: #0b0b0b;
    border: none;
    padding: 1.1rem 2rem;
    font-size: 1.4rem;
    font-weight: 800;
    border-radius: 14px;
    width: 100%;
    cursor: pointer;
    font-family: var(--font-primary);
    margin-top: 1rem;
}

.partner-text {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-icon {
    width: 60px;
    height: 60px;
    background-color: #f5f5f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #0b0b0b;
}

.login-text {
    font-size: 0.95rem;
    font-weight: 700;
}

.link-yellow {
    color: var(--accent-yellow);
    text-decoration: none;
    font-weight: 800;
}

/* =========================================
   SURVEY SCREENS
   ========================================= */
.survey-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem 1.5rem;
}

.survey-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.survey-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.survey-header p {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
}

.survey-header strong {
    font-size: 1.25rem;
}

.survey-question {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.25;
}

.survey-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: auto;
    /* Pushes the footer down */
    padding-bottom: 2rem;
}

.survey-option {
    background-color: #000;
    border: 3px solid var(--accent-purple);
    border-radius: 14px;
    padding: 1.2rem 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 85px;
    cursor: pointer;
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s, color 0.2s;
}

.survey-option.selected {
    background-color: var(--accent-purple);
    color: #000;
}

.survey-option:active {
    background-color: var(--accent-purple);
    color: #000;
    transform: scale(0.92);
}

.progress-bar-container {
    width: 60%;
    margin: 1rem auto;
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--accent-yellow);
    transition: width 0.4s ease-out;
}

.input-error {
    border: 2px solid #ff4d4d !important;
}

.survey-footer {
    text-align: center;
    padding-bottom: 1rem;
    margin-top: 1rem;
}

.skip-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

/* =========================================
   10 - ACCOUNT SCREEN
   ========================================= */
.account-content {
    padding: 1.5rem 1.5rem;
    padding-bottom: 7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.account-card {
    background-color: var(--accent-purple);
    border-radius: 16px;
    padding: 1.5rem;
    color: #000;
    margin-bottom: 1.5rem;
    width: 100%;
}

.account-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    text-align: center;
}

.account-links {
    list-style: none;
    text-align: left;
}

.account-links li {
    margin-bottom: 0.8rem;
}

.account-links a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-links a i {
    font-size: 1.2rem;
}

/* =========================================
   11 - MY MEALS SCREEN
   ========================================= */
.goals-card {
    background-color: var(--accent-purple);
    border-radius: 16px;
    padding: 2rem;
    color: #000;
}

.goals-card h3 {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}