/* --- CSS Variables for Theming --- */
:root {
    /* Default Theme: Power Up */
    --bg-gradient: linear-gradient(135deg, #00c6fb 0%, #005bea 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --text-color: #fff;
    --button-bg: #fff;
    --button-text: #005bea;
    --tab-bg: rgba(0, 0, 0, 0.2);
    --tab-active-bg: #fff;
    --tab-active-text: #005bea;
    --success-color: #8aff8a;
    --star-unlocked-color: #ffd700;
}
/* --- NEW: Theme for Break It --- */
.theme-break-it {
    --bg-gradient: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    --button-text: #ff416c;
    --tab-active-text: #ff416c;
}
/* --- NEW: Theme for Prime Me --- */
.theme-prime-me {
    --bg-gradient: linear-gradient(135deg, #1d2b64 0%, #f8cdda 100%);
    --button-text: #1d2b64;
    --tab-active-text: #1d2b64;
}
/* --- NEW: Theme for Rewire --- */
.theme-rewire {
    --bg-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --button-text: #2c9a58;
    --tab-active-text: #2c9a58;
}

/* --- Basic Setup & Layout --- */
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    margin: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
    transition: background 0.8s ease-in-out;
}
.app-header, .app-main, .app-footer {
    width: 100%;
    max-width: 500px;
    text-align: center;
}
.app-main { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; width: 100%;}
#main-content { width: 100%; }

@media (min-width: 768px) {
    .app-header, .app-main, .app-footer { max-width: 800px; }
}

/* --- Header & Branding --- */
.brand-logo { max-width: 280px; margin-bottom: 1rem; }
.main-tagline { font-size: 1.1rem; opacity: 0.9; margin: 0 auto 1.5rem auto; }
#main-content { transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; }
#main-content.fade-out { opacity: 0; transform: translateY(20px); }

/* --- MODIFIED: View Tabs with Icons --- */
.view-tabs { display: flex; background: var(--tab-bg); border-radius: 50px; padding: 5px; margin-bottom: 2rem; }
.tab-btn {
    flex: 1; background: transparent; color: var(--text-color); border: none; padding: 0.8rem 1rem;
    border-radius: 50px; font-weight: 700; cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.tab-btn svg {
    width: 20px; height: 20px;
    stroke: var(--text-color);
    transition: all 0.3s ease;
}
.tab-btn.active {
    background: var(--tab-active-bg);
    color: var(--tab-active-text);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.tab-btn.active svg { stroke: var(--tab-active-text); }

/* --- Cards & Buttons --- */
.card { background: var(--card-bg); border-radius: 20px; padding: 2rem; box-shadow: 0 8px 32px 0 rgba(0,0,0,0.2); backdrop-filter: blur(5px); position: relative; width: 100%; box-sizing: border-box; }
/* NEW: Added a prompt style for the category screen */
.category-prompt { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
button { font-family: 'Poppins', sans-serif; font-weight: 700; border: none; border-radius: 50px; padding: 1rem 2rem; font-size: 1rem; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; display: inline-flex; justify-content: center; align-items: center; gap: 0.5rem; margin: 0.5rem; }
button:hover { transform: translateY(-3px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
.category-btn { background: var(--button-bg); color: var(--button-text); }

/* --- Icon Buttons --- */
.icon-btn { position: absolute; top: 15px; background: rgba(255, 255, 255, 0.2); width: 44px; height: 44px; border-radius: 50%; padding: 0; text-decoration: none; display: flex; justify-content: center; align-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.4); }
.icon-btn svg { width: 24px; height: 24px; stroke: white; stroke-width: 2; fill: none; transition: all 0.2s ease; }
.home-btn { left: 15px; }
.favorite-btn { left: 65px; }
.refresh-btn { right: 15px; }
.favorite-btn.favorited svg { fill: #ff4757; stroke: #ff4757; }
.tooltip { position: absolute; top: 65px; left: 15px; background: #333; color: white; padding: 8px 12px; border-radius: 5px; opacity: 0; z-index: 10; transition: opacity 0.3s ease; pointer-events: none; }
.tooltip.show { opacity: 1; }

/* --- Affirmation Screen --- */
#affirmation-screen .instruction-text { font-size: 1.2rem; }
#affirmation-screen .affirmation-text-container { font-size: 2.5rem; font-weight: 700; line-height: 1.3; }
.affirmation-text-container span.spoken { color: var(--success-color); }

/* --- Win Screen & Gamification --- */
p.success-message { font-size: 1.1rem; line-height: 1.6; opacity: 0.9; }
.star-container { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.star-icon { width: 50px; height: 50px; fill: #4a4a5e; transition: fill 0.5s ease, transform 0.5s ease; }
.star-icon.unlocked { fill: var(--star-unlocked-color); transform: scale(1.1); }
.trophy-icon { display: block; width: 100px; height: auto; animation: pop-in 0.6s ease-out forwards; margin: 0 auto 1rem auto; }
@keyframes pop-in { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* --- Email Signup --- */
.email-signup-container { width: 100%; }
.email-signup-container p { margin-bottom: 1rem; }
#email-capture-form { display: flex; justify-content: center; align-items: center; gap: 0.5rem; background: rgba(0,0,0,0.2); border-radius: 50px; padding: 5px; }
#email-input { flex-grow: 1; border: none; background: transparent; color: #fff; padding: 0.8rem 1rem; font-size: 0.9rem; }
#email-input::placeholder { color: rgba(255,255,255,0.7); }
#submit-email-btn { padding: 0.6rem 1.2rem; font-size: 0.9rem; background: var(--success-color); color: #333; margin: 0; }
#email-thank-you { font-weight: 700; font-size: 1.1rem; }
.email-signup-container.large { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.2); }
.email-signup-container.large h3 { margin-top: 0; font-size: 1.2rem; }
#win-email-capture-form { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
#win-email-input { width: 80%; padding: 0.8rem; border: 1px solid rgba(255,255,255,0.3); background: transparent; color: #fff; border-radius: 8px; font-size: 1rem; text-align: center; }
#win-email-input::placeholder { color: rgba(255,255,255,0.5); }
#win-submit-email-btn { background: var(--success-color); color: #333; }

/* --- Streak Tracker --- */
.streak-tracker { position: fixed; top: 20px; right: 20px; left: auto; background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); padding: 10px 20px; border-radius: 50px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 1000; font-weight: 700; cursor: pointer; }
.streak-icon { display: inline-block; transform: translateY(2px); margin-right: 8px; }

/* --- [Previous CSS code remains the same] --- */
/* Just add these new styles at the end of your style.css file */

/* --- Streak Tracker --- */
.streak-tracker { position: fixed; top: 20px; right: 20px; /* ... existing styles */ }
.streak-icon { display: inline-block; /* ... existing styles */ }

/* --- NEW: Footer Navigation --- */
.app-footer {
    /* Make space for the new footer nav */
    padding-bottom: 1rem;
}
.footer-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.footer-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.footer-link:hover {
    opacity: 1;
}
.social-links {
    display: flex;
    gap: 1.5rem;
}
.social-icon {
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.social-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}
.social-icon svg {
    width: 28px;
    height: 28px;
}

/* ... (add this somewhere with other nav-related styles) ... */

/* NEW: Styles for the prominent link below the tabs */
.secondary-nav {
    margin-bottom: 1.5rem;
    text-align: center;
}
.secondary-nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    background: rgba(0,0,0,0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
}
.secondary-nav-link:hover {
    opacity: 1;
}


/* MODIFIED: Update the footer styles */
.footer-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* Increased gap */
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
/* NEW: Style for the row of text links */
.footer-links-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
}
.footer-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}
.footer-link:hover {
    opacity: 1;
}
.social-links {
    display: flex;
    gap: 1.5rem;
}
.social-icon {
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.social-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}
.social-icon svg {
    width: 28px;
    height: 28px;
}
/* NEW: Copyright text style */
.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 1.5rem;
    text-align: center;
}