/* Tracking My Mood - Theme System */

/* ==================== Theme: Calm (Default) ==================== */
:root, [data-theme="calm"] {
    --bg-primary: #0f1419;
    --bg-secondary: #151d24;
    --bg-card: #1c262f;
    --bg-card-hover: #243140;
    --bg-elevated: #2a3744;
    --accent-primary: #5db8a3;
    --accent-secondary: #4a90a4;
    --accent-gradient: linear-gradient(135deg, #5db8a3 0%, #4a90a4 100%);
    --accent-glow: 0 0 20px rgba(93, 184, 163, 0.25);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(93, 184, 163, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ==================== Theme: Focus (Purple/Indigo) ==================== */
[data-theme="focus"] {
    --bg-primary: #13111c;
    --bg-secondary: #1a1726;
    --bg-card: #221f2e;
    --bg-card-hover: #2d2940;
    --bg-elevated: #363248;
    --accent-primary: #a78bfa;
    --accent-secondary: #818cf8;
    --accent-gradient: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
    --accent-glow: 0 0 20px rgba(167, 139, 250, 0.25);
    --border-accent: rgba(167, 139, 250, 0.3);
}

/* ==================== Theme: Warm (Coral/Amber) ==================== */
[data-theme="warm"] {
    --bg-primary: #1a1412;
    --bg-secondary: #231c18;
    --bg-card: #2d2420;
    --bg-card-hover: #3d322c;
    --bg-elevated: #4a3f38;
    --accent-primary: #f0a58f;
    --accent-secondary: #e9b872;
    --accent-gradient: linear-gradient(135deg, #f0a58f 0%, #e9b872 100%);
    --accent-glow: 0 0 20px rgba(240, 165, 143, 0.25);
    --border-accent: rgba(240, 165, 143, 0.3);
}

/* ==================== Theme: Night (Ultra Dark) ==================== */
[data-theme="night"] {
    --bg-primary: #09090b;
    --bg-secondary: #0f0f12;
    --bg-card: #18181b;
    --bg-card-hover: #212124;
    --bg-elevated: #27272a;
    --accent-primary: #71717a;
    --accent-secondary: #52525b;
    --accent-gradient: linear-gradient(135deg, #71717a 0%, #52525b 100%);
    --accent-glow: 0 0 20px rgba(113, 113, 122, 0.15);
    --border-accent: rgba(113, 113, 122, 0.3);
}

/* ==================== Theme: Light (Soft Blues) ==================== */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-elevated: #e2e8f0;
    --accent-primary: #0ea5e9;
    --accent-secondary: #6366f1;
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    --accent-glow: 0 0 20px rgba(14, 165, 233, 0.2);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(14, 165, 233, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ==================== Shared Variables ==================== */
:root {
    /* Status Colors (shared across themes) */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Spacing (shared across themes) */
    --nav-height: 70px;
    --header-height: 60px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + 20px);
}

/* ==================== Header ==================== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.app-logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* ==================== Main Content ==================== */
.app-content {
    margin-top: var(--header-height);
    padding: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

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

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

/* ==================== Cards ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 16px;
    overflow: hidden;
    position: relative;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== Form Elements ==================== */
.form-group {
    margin-bottom: 12px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Sliders */
.slider-container {
    position: relative;
    padding: 10px 0;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--accent-glow);
    transition: transform 0.2s;
}

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

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--accent-gradient);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--accent-glow);
}

.slider-value {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Inputs & Textareas */
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a1a1aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 0.875rem;
}

/* ==================== Bottom Navigation ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    min-width: 48px;
    flex: 1;
}

.nav-item:hover {
    color: var(--text-secondary);
}

.nav-item.active {
    color: var(--accent-primary);
}

.nav-item.active .nav-icon {
    text-shadow: var(--accent-glow);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

/* Floating Action Button */
.fab {
    position: relative;
    width: 56px;
    height: 56px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -28px;
    box-shadow: var(--accent-glow), var(--shadow-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5), var(--shadow-lg);
}

.fab:active {
    transform: scale(0.95);
}

.fab-icon {
    font-size: 1.75rem;
    color: white;
}

/* ==================== Filter Pills ==================== */
.filter-section {
    margin-bottom: 12px;
}

.filter-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Icon-only pills that fit on 375px screen */
.icon-pills {
    display: flex;
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    -webkit-overflow-scrolling: touch; /* Smooth scroll on iOS */
    padding-bottom: 4px; /* Space for scroll gesture */
}

.icon-pills::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.icon-pill {
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-pill:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-accent);
    transform: scale(1.05);
}

.icon-pill:active {
    transform: scale(0.95);
}

.icon-pill.active {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: var(--accent-glow);
}

.icon-pill.toggle.active {
    background: var(--accent-gradient);
    border-color: transparent;
}

.pill-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color);
    margin: 8px 4px;
}

/* Pill Scroll Container */
.pill-scroll {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Mood Pills (emoji only) */
.mood-pill {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mood-pill:hover {
    transform: scale(1.1);
    border-color: var(--border-accent);
}

.mood-pill.active {
    border-color: var(--accent-primary);
    background: var(--bg-card);
    box-shadow: var(--accent-glow);
    transform: scale(1.1);
}

/* ==================== Stats Cards ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==================== Entry Cards ==================== */
.entry-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.entry-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.entry-title {
    font-weight: 600;
    color: var(--text-primary);
}

.entry-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.entry-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.entry-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tag.mood-good { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.tag.mood-neutral { background: rgba(59, 130, 246, 0.2); color: var(--info); }
.tag.mood-low { background: rgba(239, 68, 68, 0.2); color: var(--error); }

/* ==================== Activity Grid ==================== */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.activity-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.activity-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.activity-card.completed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.activity-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.activity-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-duration {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==================== Meal Cards ==================== */
.meal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 16px;
    transition: all 0.2s;
    position: relative;
}

.meal-card:hover {
    border-color: var(--border-accent);
}

/* Favorite button on meal cards */
.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.favorite-btn:active {
    transform: scale(0.95);
}

.meal-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.meal-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.meal-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meal-badges {
    display: flex;
    gap: 6px;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-vegan { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.badge-gf { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
.badge-df { background: rgba(59, 130, 246, 0.2); color: var(--info); }

.meal-description {
    padding: 0 16px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meal-ingredients,
.meal-benefits {
    padding: 0 16px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.meal-ingredients strong,
.meal-benefits strong {
    color: var(--text-muted);
    font-weight: 500;
}

.nutrition-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px;
    margin-bottom: 12px;
}

.nutrition-tag {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.meal-actions {
    padding: 0 16px 16px;
}

.meal-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.meal-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* ==================== Charts Container ==================== */
.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 200px;
}

/* ==================== Category Pills ==================== */
.category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.pill:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.pill.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* ==================== Filter Row ==================== */
.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 120px;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
}

/* ==================== Photo Gallery ==================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.photo-item {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    font-size: 0.7rem;
    color: white;
}

/* ==================== Theme Picker ==================== */
.theme-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.theme-option:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--accent-primary);
    box-shadow: var(--accent-glow);
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.theme-preview.calm {
    background: linear-gradient(135deg, #5db8a3 0%, #4a90a4 100%);
}

.theme-preview.focus {
    background: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
}

.theme-preview.warm {
    background: linear-gradient(135deg, #f0a58f 0%, #e9b872 100%);
}

.theme-preview.night {
    background: linear-gradient(135deg, #71717a 0%, #52525b 100%);
}

.theme-preview.light {
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==================== Settings ==================== */
.settings-section {
    margin-bottom: 24px;
}

.settings-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-item:hover {
    background: var(--bg-card-hover);
}

.settings-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.settings-item-text h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2px;
}

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

.settings-arrow {
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 50px;
    height: 28px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-elevated);
    border-radius: 14px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
    background: var(--accent-primary);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background: white;
}

/* ==================== Welcome Modal ==================== */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.welcome-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.4s ease-out;
}

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

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.welcome-content h2 {
    font-size: 1.75rem;
    margin-bottom: 10px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content > p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 25px;
}

.welcome-features {
    text-align: left;
    margin-bottom: 25px;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.welcome-feature:last-child {
    border-bottom: none;
}

.welcome-feature .feature-icon {
    font-size: 1.25rem;
    min-width: 30px;
    text-align: center;
}

.welcome-feature span:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.welcome-btn {
    width: 100%;
    padding: 16px !important;
    font-size: 1.1rem !important;
    margin-bottom: 12px;
}

.welcome-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* ==================== Skeleton Loaders ==================== */
.skeleton-loader {
    padding: 10px 0;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card-hover) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 14px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.skeleton-card {
    height: 80px;
    border-radius: var(--radius-md);
}

.skeleton-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.skeleton-photo {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ==================== Voice Recording ==================== */
.voice-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.25rem;
}

.voice-btn:hover {
    background: var(--bg-card-hover);
    color: var(--accent-primary);
}

.voice-btn.recording {
    background: var(--error);
    border-color: var(--error);
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.voice-status {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-lg);
}

/* ==================== Empty States ==================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-text {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ==================== Stats Summary ==================== */
.stats-summary {
    display: flex;
    justify-content: space-around;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-item .stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ==================== Exercise Card ==================== */
.exercise-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.exercise-card-layout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.exercise-stamp {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(124, 58, 237, 0.15));
    border: 1px solid var(--border-color);
}

/* Type-specific stamp colors */
.exercise-stamp[data-type="yoga"] { background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(168, 85, 247, 0.1)); }
.exercise-stamp[data-type="breathing"] { background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.1)); }
.exercise-stamp[data-type="walking"] { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1)); }
.exercise-stamp[data-type="stretching"] { background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1)); }
.exercise-stamp[data-type="cardio"] { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1)); }
.exercise-stamp[data-type="strength"] { background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(234, 88, 12, 0.1)); }
.exercise-stamp[data-type="hiit"] { background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.15)); }
.exercise-stamp[data-type="cycling"] { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1)); }

.exercise-card-content {
    flex: 1;
}

.exercise-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.exercise-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.exercise-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.exercise-card-benefit {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.exercise-card-actions {
    display: flex;
    gap: 8px;
}

.exercise-card-actions button {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exercise-card-actions button:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}

.exercise-card-actions .save-button {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: #fff;
}

.exercise-card-actions .save-button:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.exercise-log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.exercise-log-item:last-child {
    border-bottom: none;
}

.exercise-log-info h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.exercise-log-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.exercise-log-duration {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
}

/* ==================== Modal Base ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    padding: 20px;
    backdrop-filter: blur(4px);
}

/* ==================== Exercise Detail Modal ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
}

.exercise-modal-content {
    padding: 24px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--bg-tertiary);
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.exercise-detail-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.exercise-stamp.large {
    width: 72px;
    height: 72px;
    min-width: 72px;
    font-size: 2.2rem;
}

.exercise-detail-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
}

.exercise-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.exercise-detail-meta .badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.exercise-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.exercise-detail-section {
    margin-bottom: 20px;
}

.exercise-detail-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.exercise-detail-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.instructions-list {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.instructions-list li {
    margin-bottom: 6px;
}

.similar-exercises {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.similar-exercise {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.similar-exercise:hover {
    background: var(--bg-primary);
    transform: translateX(4px);
}

.similar-icon {
    font-size: 1.4rem;
}

.similar-info {
    display: flex;
    flex-direction: column;
}

.similar-info strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.similar-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.exercise-detail-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.exercise-detail-actions .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exercise-detail-actions .btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* ==================== Responsive ==================== */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .filter-row {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }
}

/* ==================== Safe Areas (Notch/Home Indicator) ==================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body {
        padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 20px);
    }

    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ==================== Account Modal ==================== */
.account-modal-content {
    padding: 32px 24px;
    max-width: 400px;
}

.account-view {
    animation: fadeIn 0.3s ease;
}

.account-header {
    text-align: center;
    margin-bottom: 28px;
}

.account-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.account-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.account-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.account-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
    color: white;
    font-weight: 600;
    overflow: hidden;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-form {
    margin-bottom: 20px;
}

.account-form .form-group {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(93, 184, 163, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.btn-full {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    justify-content: center;
}

.btn-google {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.btn-google:hover {
    background: var(--bg-card-hover);
}

.btn-google svg {
    flex-shrink: 0;
}

.signin-status {
    text-align: center;
    padding: 12px;
    margin-top: 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.account-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.account-divider::before,
.account-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.account-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 20px;
    line-height: 1.5;
}

.account-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.account-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-card-icon {
    font-size: 1.5rem;
}

.account-card-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.account-card-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Currency Picker */
.currency-picker {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.currency-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.currency-btn:hover {
    border-color: var(--accent-primary);
    background: var(--bg-elevated);
}

.currency-btn.active {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(124, 58, 237, 0.1));
}

.currency-symbol {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.currency-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.currency-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.account-menu {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.account-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.account-menu-item:hover {
    background: var(--bg-card);
}

.account-menu-item .menu-arrow {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.account-menu-item.text-danger {
    color: var(--error);
}

.account-menu-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Reminder Settings */
.reminder-settings {
    padding: 16px 0 0 0;
    border-top: 1px solid var(--border-color);
    margin-top: 12px;
}

.reminder-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-elevated);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: var(--accent-primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
    background: white;
}

.toggle-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reminder-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
}

.reminder-time-row label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.reminder-time-row input[type="time"] {
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
}

.reminder-time-row input[type="time"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Period selector buttons */
.period-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.period-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.period-btn.active {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.period-btn.locked {
    color: var(--text-muted);
    background: var(--bg-tertiary);
    opacity: 0.7;
    cursor: pointer;
}

.period-btn.locked:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

/* Period badge on chart titles */
.period-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(93, 184, 163, 0.15);
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ==================== Boost Module ==================== */

/* Quick Check-in */
.boost-checkin {
    text-align: center;
    padding: 16px 0;
}

.boost-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.mood-quick-select {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.mood-quick-btn {
    width: 48px;
    height: 48px;
    font-size: 24px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mood-quick-btn:hover {
    transform: scale(1.1);
    border-color: var(--accent-primary);
}

.mood-quick-btn.active {
    border-color: var(--accent-primary);
    background: rgba(93, 184, 163, 0.2);
    transform: scale(1.15);
}

/* Boost Suggestion */
.boost-suggestion {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
}

.boost-suggestion-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.boost-suggestion-icon {
    font-size: 28px;
}

.boost-suggestion-text {
    flex: 1;
}

.boost-suggestion-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.boost-suggestion-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Intervention Grid */
.intervention-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 8px 0;
}

.intervention-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.intervention-card:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.intervention-icon {
    font-size: 32px;
}

.intervention-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.intervention-time {
    font-size: 11px;
    color: var(--text-muted);
}

/* Intervention Panel */
.intervention-panel {
    position: relative;
}

.intervention-panel .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intervention-panel .close-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.intervention-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.intervention-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.intervention-item:hover {
    background: var(--bg-elevated);
    border-color: var(--accent-primary);
}

.intervention-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.intervention-item-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Breathing Exercise */
.breathing-container {
    text-align: center;
    padding: 20px;
}

.breathing-circle {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: none;
}

.breathing-circle.animate {
    animation: breathe 16s infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1.2); }
    75% { transform: scale(1); }
}

.breathing-text {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.breathing-count {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
}

.breathing-instruction {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breathing-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Close button for exercise panels */
#timer-exercise .close-btn,
#breathing-exercise .close-btn,
#grounding-exercise .close-btn,
#prompt-exercise .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#timer-exercise .close-btn:hover,
#breathing-exercise .close-btn:hover,
#grounding-exercise .close-btn:hover,
#prompt-exercise .close-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* Timer Exercise */
.timer-container {
    text-align: center;
    padding: 20px;
}

.timer-circle {
    width: 160px;
    height: 160px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 4px solid var(--accent-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timer-circle.active {
    border-color: var(--success);
}

.timer-count {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
}

.timer-label {
    font-size: 14px;
    color: var(--text-muted);
}

.timer-instruction {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 20px;
    min-height: 24px;
}

.timer-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Grounding Exercise */
.grounding-container {
    padding: 20px;
}

.grounding-step {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.grounding-step.active {
    display: block;
}

.grounding-number {
    font-size: 72px;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 12px;
}

.grounding-text {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.grounding-hint {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.grounding-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Prompt Exercise */
.prompt-container {
    padding: 20px;
}

.prompt-text {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.prompt-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    margin-bottom: 16px;
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.prompt-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Audio Boost Styles */
.audio-boost-container {
    padding: 16px 0;
}

.audio-category-select {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.audio-cat-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-cat-btn.active {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.audio-cat-btn:hover {
    border-color: var(--accent-primary);
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    margin-bottom: 16px;
}

.audio-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.audio-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.5);
}

.audio-play-btn:active {
    transform: scale(0.95);
}

.audio-play-btn.playing .play-icon {
    display: none;
}

.audio-play-btn.playing::after {
    content: "⏸";
}

.audio-info {
    flex: 1;
    min-width: 0;
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    height: 40px;
    margin-bottom: 8px;
}

.audio-bar {
    width: 6px;
    height: 8px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 3px;
    transition: height 0.1s ease;
}

.audio-visualizer.playing .audio-bar {
    animation: audioWave 0.8s ease-in-out infinite;
}

.audio-visualizer.playing .audio-bar:nth-child(1) { animation-delay: 0s; }
.audio-visualizer.playing .audio-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-visualizer.playing .audio-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-visualizer.playing .audio-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-visualizer.playing .audio-bar:nth-child(5) { animation-delay: 0.4s; }
.audio-visualizer.playing .audio-bar:nth-child(6) { animation-delay: 0.3s; }
.audio-visualizer.playing .audio-bar:nth-child(7) { animation-delay: 0.2s; }
.audio-visualizer.playing .audio-bar:nth-child(8) { animation-delay: 0.1s; }
.audio-visualizer.playing .audio-bar:nth-child(9) { animation-delay: 0s; }

@keyframes audioWave {
    0%, 100% { height: 8px; }
    50% { height: 36px; }
}

.audio-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 8px 0;
    text-align: center;
}

.audio-visualizer.playing + .audio-hint {
    display: none;
}

.audio-progress {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.audio-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 0.1s linear;
}

.audio-shuffle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==================== Toast Notifications ==================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast-icon {
    font-size: 24px;
    animation: toastBounce 0.6s ease;
}

@keyframes toastBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

/* Success button animation */
.btn-success-flash {
    animation: successFlash 0.6s ease;
}

@keyframes successFlash {
    0% { transform: scale(1); }
    25% { transform: scale(1.05); background: linear-gradient(135deg, #10b981, #059669); }
    50% { transform: scale(1); }
    75% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ==================== Icon Select Buttons ==================== */
.icon-select-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.icon-select-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
}

.icon-select-btn:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
}

.icon-select-btn.active {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.icon-select-icon {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.icon-select-btn.intensity .icon-select-icon {
    font-size: 20px;
}

.icon-select-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
