/* CSS Variables & 4 Themes */
:root { /* Default Dark Theme */
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --primary-color: #00e676; /* Green */
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --nav-bg: #1a1a1a;
    --danger: #ff3d00;
}

[data-theme="light"] {
    --bg-color: #f4f7f6;
    --card-bg: #ffffff;
    --primary-color: #2962ff; /* Blue */
    --text-main: #333333;
    --text-muted: #666666;
    --nav-bg: #ffffff;
    --danger: #d32f2f;
}

[data-theme="neon"] {
    --bg-color: #050505;
    --card-bg: #111111;
    --primary-color: #00ffff; /* Cyan Glow */
    --text-main: #ffffff;
    --text-muted: #888888;
    --nav-bg: #0a0a0a;
    --danger: #ff0055;
}

[data-theme="ocean"] {
    --bg-color: #0b132b;
    --card-bg: #1c2541;
    --primary-color: #4facfe; /* Light Blue */
    --text-main: #e0f2f1;
    --text-muted: #9aa5b1;
    --nav-bg: #0b132b;
    --danger: #ff6b6b;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    padding-bottom: 80px; /* Space for Bottom Nav */
    transition: background-color 0.3s, color 0.3s;
}

/* Header & Progress Bar */
.header {
    padding: 20px;
    background: var(--card-bg);
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.user-info h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.progress-container {
    margin-top: 15px;
    background: rgba(128,128,128,0.2);
    border-radius: 10px;
    height: 8px;
    width: 100%;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Main Content & Tabs */
.main-content {
    padding: 20px;
}

.tab-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-section.active {
    display: block;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--text-muted);
    padding-bottom: 10px;
}

.add-btn {
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    padding: 6px 15px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Lists & Item Cards (Tasks, Routine, Diet) */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-card {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary-color);
    transition: 0.3s;
}

.item-card.done {
    opacity: 0.5;
    border-left-color: var(--text-muted);
}

.item-card.done .item-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.item-info {
    flex-grow: 1;
    margin: 0 15px;
}

.item-title {
    font-weight: 600;
    font-size: 1rem;
    display: block;
}

.item-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    accent-color: var(--primary-color);
}

.delete-btn {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Settings Forms */
.settings-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
}

.settings-card label {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.settings-card input, .settings-card select {
    width: 100%;
    padding: 12px;
    margin-top: 5px;
    border-radius: 8px;
    border: 1px solid var(--text-muted);
    background: var(--bg-color);
    color: var(--text-main);
    outline: none;
}

.save-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 25px;
    cursor: pointer;
}

.reset-btn {
    width: 100%;
    padding: 15px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: var(--nav-bg);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid rgba(128,128,128,0.2);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: 0.3s;
}

.nav-item.active {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.nav-item .icon {
    font-size: 1.4rem;
    margin-bottom: 3px;
}

/* Modals (Popups) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    border: 2px solid var(--primary-color);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid var(--text-muted);
    background: var(--bg-color);
    color: var(--text-main);
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.modal-actions button:first-child {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}
