:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --primary: #4CAF50; 
    --accent: #2196F3;
    --gold: #FFD700;
    --danger: #f44336;
    --warn: #FF9800;
    --text: #ffffff;
    --text-dim: #888888;
}

body {
    background-color: var(--bg-color);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; 
}

.screen {
    display: none;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    min-height: 100vh; 
    padding-bottom: 50px; 
}

.screen.active { display: flex; }

/* Dashboard */
.dashboard-header { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #333; }
.rank-badge { font-size: 2.5rem; background: #252525; width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; border-radius: 12px; border: 1px solid #444; }
.header-text { flex-grow: 1; }
.rank-label { font-size: 0.7rem; color: var(--gold); letter-spacing: 1px; font-weight: bold; }
#rank-title { margin: 0; font-size: 1.4rem; text-transform: uppercase; }
.streak-mini { font-size: 0.8rem; color: var(--text-dim); background: #252525; padding: 5px 10px; border-radius: 20px; }

/* Heatmap */
.heatmap-card { margin-bottom: 20px; }
.heatmap-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.heatmap-header h3 { font-size: 0.9rem; margin: 0; color: #ccc; }
.legend { font-size: 0.7rem; color: #666; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 3px; margin-left: 8px; }
.dot.green { background: var(--primary); }
.dot.yellow { background: var(--warn); }
.dot.red { background: var(--danger); }
.heatmap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(10px, 1fr)); gap: 3px; max-width: 100%; overflow-x: auto; }
.heat-sq { width: 100%; aspect-ratio: 1; background: #252525; border-radius: 2px; }
.heat-sq.success { background: var(--primary); opacity: 0.8; }
.heat-sq.fail { background: var(--danger); opacity: 0.8; }
.heat-sq.rest-day { background: var(--warn); opacity: 0.8; }
.heat-sq.empty { background: #333; }

/* Mission Card */
.mission-card { background: linear-gradient(145deg, #1e1e1e, #252525); border: 1px solid #444; border-radius: 16px; padding: 20px; margin-bottom: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.mission-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mission-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1.5px; }
.phase-tag { background: var(--primary); color: #000; font-size: 0.7rem; font-weight: bold; padding: 2px 8px; border-radius: 4px; }
#phase-title-dash { margin: 5px 0; font-size: 1.5rem; }
#phase-desc-dash { margin: 0 0 20px; color: var(--text-dim); font-size: 0.9rem; font-style: italic; }
.bullet-tracker { 
    display: flex; 
    justify-content: space-between; 
    background: #111; 
    padding: 12px; 
    border-radius: 12px; 
    margin-bottom: 15px; 
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5); 
    border: 1px solid #333; 
}

.bullet { 
    width: 14px; 
    height: 30px; 
    background: #2a2a2a; /* Empty state */
    border-radius: 4px; 
    position: relative; 
    overflow: hidden; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    border: 1px solid #444; 
}

/* 1. Green Fill (Default Success) */
.bullet.filled { 
    background: var(--primary); 
    border-color: #66bb6a; 
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6); 
    transform: scale(1.1); 
}

/* 2. Red Fill (Fail) - Must come AFTER .filled */
.bullet.fail { 
    background: var(--danger) !important; 
    border-color: #d32f2f !important; 
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.6) !important; 
}.mission-footer { display: flex; justify-content: space-between; align-items: center; }
.text-btn { background: none; border: none; color: var(--accent); font-size: 0.8rem; cursor: pointer; text-decoration: none; font-weight: bold; }

/* Actions */
.dashboard-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.secondary-actions-row { display: flex; gap: 10px; }
.large-action { padding: 20px; font-size: 1.3rem; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 0 20px rgba(76, 175, 80, 0.2); }

/* Settings (Clean) */
.accordion-card { background: #1e1e1e; border-radius: 8px; margin-bottom: 10px; overflow: hidden; border: 1px solid #333; }
.accordion-card summary { padding: 15px; cursor: pointer; font-weight: bold; color: #bbb; list-style: none; }
.accordion-content { padding: 20px; background: #181818; display: flex; flex-direction: column; gap: 20px; border-top: 1px solid #333; }
.setting-group { display: flex; flex-direction: column; gap: 10px; }
.setting-group.row-flex { flex-direction: row; justify-content: space-between; align-items: center; padding: 5px 0; }
.setting-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.setting-label { font-size: 0.95rem; color: #ddd; font-weight: 500; }
.setting-value-badge { background: #333; color: var(--accent); padding: 2px 8px; border-radius: 4px; font-size: 0.85rem; font-weight: bold; }

/* Switch & Slider */
.styled-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: #333; border-radius: 5px; outline: none; transition: background 0.3s; }
.styled-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; background: var(--accent); border-radius: 50%; cursor: pointer; box-shadow: 0 0 10px rgba(33, 150, 243, 0.4); }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* Danger Button */
.danger-area { margin-top: 10px; padding-top: 15px; border-top: 1px solid #333; }
.danger-btn-modern { width: 100%; padding: 12px; background: rgba(244, 67, 54, 0.08); border: 1px solid var(--danger); color: var(--danger); font-weight: bold; border-radius: 8px; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: all 0.3s; }
.danger-btn-modern:hover { background: var(--danger); color: white; box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4); transform: translateY(-1px); }

/* Session */
.session-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    flex-grow: 1;
    justify-content: center;
}
.session-header-row { display: flex; justify-content: flex-end; padding-bottom: 10px; }
.icon-btn { background: transparent; border: 1px solid #333; color: #666; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; }
.icon-btn.active { color: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(33, 150, 243, 0.3); }
#main-timer { font-size: 3.5rem; font-weight: bold; text-align: center; margin-bottom: 20px; font-variant-numeric: tabular-nums; transition: opacity 0.5s; }
.zen-active #main-timer { opacity: 0; }
.zen-active .top-bar { opacity: 0.2; }
.peak-button.square-big {
    width: 100%;
    aspect-ratio: 1 / 1.3;
    border-radius: 20px;
    margin: 0;
    flex-grow: 0;
    background: var(--card-bg);
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.15);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}
.peak-button:active { background: #2e3d2f; }
.action-row {
    display: flex;
    gap: 20px;
    width: 100%;
}
.peak-button.resting {
    background: rgba(33, 150, 243, 0.15); /* Dark Transparent Blue */
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 30px rgba(33, 150, 243, 0.25);
    transition: all 0.3s ease;
}

.peak-button.resting .btn-label {
    font-size: 4rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}

.peak-button.resting .btn-sub {
    color: #aad4ff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.control-btn {
    flex: 1;
    aspect-ratio: 1;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.1s;
}

.control-btn:active { transform: scale(0.95); }
.control-btn .icon { font-size: 1.5rem; font-weight: 900; }

/* Colors */
.control-btn.orange { background: var(--warn); }
.control-btn.red { background: var(--danger); }
.control-btn.green { background: var(--primary); color: #000; }
#rest-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: var(--accent); color: white; display: flex; justify-content: center; align-items: center; text-align: center; z-index: 10; cursor: pointer; }
#rest-overlay.hidden { display: none; }
#rest-timer { font-size: 5rem; font-weight: bold; }
.tap-hint { margin-top: 30px; font-size: 0.9rem; opacity: 0.7; animation: pulse 2s infinite; }

/* Logbook */
.log-header { text-align: center; margin-bottom: 20px; }
.log-header h2 { margin: 0; font-size: 2rem; color: var(--primary); }
.log-grid { display: flex; flex-direction: column; gap: 25px; }
.log-section label { display: block; margin-bottom: 10px; font-weight: bold; color: #bbb; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
#journal-input { width: 100%; background: #252525; border: 1px solid #444; color: white; padding: 15px; border-radius: 8px; font-family: inherit; box-sizing: border-box; resize: none; }
.status-cards { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

.status-card { 
    background: #252525; 
    border: 2px solid #333; 
    border-radius: 12px; 
    padding: 20px 10px; /* More vertical padding */
    text-align: center; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    opacity: 0.7; 
}

.status-card .icon { 
    font-size: 2.2rem; 
    margin-bottom: 8px; 
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.status-card .text { 
    font-weight: 800; /* Extra Bold */
    font-size: 1.4rem; /* Larger text */
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    color: #fff;
}

.status-card .sub { 
    font-size: 0.75rem; 
    color: #999; 
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Selected States */
.status-card.selected { 
    opacity: 1; 
    transform: translateY(-2px); 
    border-width: 2px;
}

.status-card.success.selected { 
    border-color: var(--primary); 
    background: rgba(76, 175, 80, 0.15); 
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.status-card.success.selected .text { color: var(--primary); }

.status-card.fail.selected { 
    border-color: var(--danger); 
    background: rgba(244, 67, 54, 0.15); 
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.2);
}

.status-card.fail.selected .text { color: var(--danger); }
.alert-box { background: rgba(244, 67, 54, 0.2); border-left: 4px solid var(--danger); color: #ffcccb; padding: 10px; margin-top: 15px; border-radius: 4px; font-size: 0.9rem; }
.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 20px; /* Increased gap */
    background: #252525;
    padding: 25px 20px; /* More padding */
    border-radius: 16px;
}
#ehs-display-emoji {
    font-size: 5rem; /* Much bigger emoji */
    min-width: 80px;
    text-align: center;
    line-height: 1;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}
.styled-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 16px;
    background: #444;
    border-radius: 10px;
    outline: none;
    transition: background 0.3s;
}
.styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;  /* Big touch target */
    height: 20px; /* Big touch target */
    background: var(--accent);
    border: 3px solid #fff; /* White border for contrast */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin-top: -2px; /* Center alignment adjustment if needed */
}
.styled-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    background: var(--primary); /* Changes color when dragging */
}
/* --- BIGGER SLIDER STYLES --- */

/* The Track */
#ehs-input {
    flex-grow: 1;
    -webkit-appearance: none; /* Override default look */
    appearance: none;
    height: 20px; /* Much thicker track */
    border-radius: 10px;
    background: #444;
    outline: none;
    transition: background 0.2s;
}

/* The Handle (Thumb) - Webkit (Chrome/Safari/Edge) */
#ehs-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;  /* Big, touch-friendly handle */
    height: 40px; 
    background: var(--accent);
    border: 4px solid #fff; /* White border to make it pop */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

/* The Handle (Thumb) - Firefox */
#ehs-input::-moz-range-thumb {
    width: 40px; 
    height: 40px; 
    background: var(--accent);
    border: 4px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border: none; /* Remove default border */
}.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding: 0 10px;
}
#ehs-val-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}
#ehs-text-desc {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent);
}
.chips-container { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { flex: 1; background: #2a2a2a; border: 1px solid #444; color: #bbb; padding: 12px; border-radius: 20px; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.chip.active { background: var(--accent); color: white; border-color: var(--accent); }

/* Improved Graph Styles */
.chart-container { background: #1e1e1e; border: 1px solid #333; border-radius: 12px; padding: 15px; margin-bottom: 20px; }
.chart-label { display: block; font-size: 0.75rem; color: #888; margin-bottom: 10px; text-transform: uppercase; font-weight: bold; }
.graph-wrapper { width: 100%; height: 100px; position: relative; border-bottom: 1px solid #444; border-left: 1px solid #444; }
#stats-graph { width: 100%; height: 100%; }
.graph-line { fill: none; stroke: var(--primary); stroke-width: 3px; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 6px rgba(76, 175, 80, 0.3)); }

/* History & Achievements */
.screen-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #333; }
.back-btn { background: none; border: none; color: #888; font-size: 1rem; cursor: pointer; }
.history-list { display: flex; flex-direction: column; gap: 15px; }
.history-item-wrapper { position: relative; overflow: hidden; border-radius: 10px; margin-bottom: 15px; }
.history-card { position: relative; z-index: 2; background: #1e1e1e; border: 1px solid #333; padding: 15px; border-radius: 10px; transition: transform 0.3s ease; width: 100%; margin-bottom: 0; box-sizing: border-box; }
.history-top { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.9rem; color: #888; }
.history-body { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.h-metric { text-align: center; }
.h-metric span { display: block; font-weight: bold; font-size: 1.1rem; color: #fff; }
.h-metric label { font-size: 0.65rem; color: #666; text-transform: uppercase; }
.history-note { background: #252525; padding: 10px; border-radius: 5px; font-size: 0.85rem; color: #ccc; font-style: italic; border-left: 2px solid var(--accent); }
.split-peaks { font-size: 0.7rem; color: #555; margin-top: 5px; }
.achievements-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ach-card { background: #1e1e1e; border: 1px solid #333; padding: 15px; border-radius: 12px; text-align: center; opacity: 0.5; filter: grayscale(1); transition: all 0.3s; }
.ach-card.unlocked { opacity: 1; filter: grayscale(0); border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 215, 0, 0.1); }
.ach-icon { font-size: 2.5rem; margin-bottom: 10px; }
.ach-title { font-weight: bold; font-size: 1rem; color: var(--gold); margin-bottom: 5px; }
.ach-desc { font-size: 0.75rem; color: #888; }

/* Buttons & Utils */
.primary-btn { background: var(--primary); color: white; border: none; padding: 15px; width: 100%; font-size: 1.2rem; border-radius: 8px; cursor: pointer; }
.secondary-btn { background: transparent; border: 1px solid #555; color: #ccc; padding: 12px; border-radius: 8px; cursor: pointer; flex: 1; }
.danger-btn-filled { background: var(--danger); color: white; border: none; padding: 12px; border-radius: 8px; cursor: pointer; flex: 1; }
.pulse-btn { animation: pulseBtn 2s infinite; }
.hidden { display: none !important; }
.link-btn { background: none; border: none; color: #666; cursor: pointer; text-decoration: underline; }

/* Text Buttons */
.text-btn-sub { background: none; border: none; color: #888; font-size: 0.8rem; cursor: pointer; text-decoration: underline; }
.modal-actions-col { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; width: 100%; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.85); display: flex; justify-content: center; align-items: center; z-index: 100; backdrop-filter: blur(5px); }
.modal-card { background: #1e1e1e; border: 2px solid var(--gold); width: 85%; max-width: 400px; padding: 30px; border-radius: 20px; text-align: center; position: relative; box-shadow: 0 0 30px rgba(255, 215, 0, 0.2); animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.mini-modal { border-color: #444; box-shadow: 0 10px 25px rgba(0,0,0,0.5); padding: 25px; }
.modal-icon { font-size: 3rem; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 15px; margin-top: 20px; }
.intel-section { text-align: left; margin-bottom: 25px; }
.intel-section label { color: var(--text-dim); font-size: 0.7rem; font-weight: bold; letter-spacing: 1px; display: block; margin-bottom: 8px; }
.goals-list { padding-left: 20px; margin: 0; color: #ddd; font-size: 0.95rem; line-height: 1.5; }
.changelog-list { padding-left: 20px; margin: 15px 0; color: #ddd; font-size: 0.9rem; line-height: 1.6; text-align: left; }
.changelog-list li { margin-bottom: 8px; }
.technique-box { background: #252525; padding: 15px; border-radius: 8px; border-left: 3px solid var(--primary); color: #fff; font-size: 1rem; line-height: 1.4; }

@keyframes pulseBtn { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); } 70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); } }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* --- CELEBRATION MODAL FIXES --- */

/* Center the content area */
.levelup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

/* Make the lock icon big and bouncy */
.lock-icon-large {
    font-size: 3.5rem;
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

/* The "UNLOCKED" text */
.unlock-label {
    display: block; /* Forces it to its own line */
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    font-weight: bold;
    margin-bottom: 5px; /* Space between "UNLOCKED" and "PHASE 2" */
}

/* The "PHASE 2" text */
.phase-name-large {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0 0 15px 0; /* Space below the title */
    text-transform: uppercase;
}

/* Description Text */
.phase-preview-text {
    color: #ccc;
    font-style: italic;
    font-size: 1rem;
    margin: 0;
    max-width: 80%; /* Prevents text from hitting the edges */
    line-height: 1.4;
}

/* Optional: Simple Bounce Animation for the lock */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* --- FOOTER & SUPPORT --- */

.app-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center;
    padding-bottom: 30px; /* Extra padding for bottom of mobile screen */
}

.footer-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* Wraps on very small screens */
}

.footer-btn {
    text-decoration: none;
    background: #252525;
    border: 1px solid #444;
    padding: 10px 20px;
    border-radius: 50px; /* Pill shape */
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.footer-btn span {
    font-size: 1.1rem;
}

/* Hover/Active States */
.footer-btn:active {
    transform: scale(0.95);
}

.footer-btn.coffee:hover {
    border-color: #FFDD00; /* Coffee yellow/gold */
    color: #fff;
    background: rgba(255, 221, 0, 0.1);
}

.footer-btn.gear:hover {
    border-color: var(--accent); /* Blue */
    color: #fff;
    background: rgba(33, 150, 243, 0.1);
}

.version-text {
    margin-top: 20px;
    font-size: 0.7rem;
    color: #444;
}

/* --- LANDING PAGE --- */
.landing-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Full screen height */
    text-align: center;
    padding: 20px;
}

.landing-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(76, 175, 80, 0.3));
    animation: bounce 3s infinite ease-in-out;
}

.landing-title {
    font-size: 3rem;
    margin: 0;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.landing-subtitle {
    font-size: 1.1rem;
    color: #aaa;
    margin-top: 10px;
    margin-bottom: 50px;
    max-width: 300px;
    line-height: 1.5;
}

.landing-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 50px;
    text-align: left;
    width: 100%;
    max-width: 350px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #333;
}

.f-icon {
    font-size: 2rem;
}

.f-text strong {
    display: block;
    color: var(--text);
    margin-bottom: 4px;
}

.f-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #888;
}

.landing-footer {
    margin-top: 30px;
    font-size: 0.7rem;
    color: #444;
}

/* --- ONBOARDING --- */
.onboarding-container { 
    max-width: 400px; 
    margin: 0 auto; 
    width: 100%; 
}
.onboarding-title { text-align: center; color: var(--primary); font-size: 2rem; margin-bottom: 5px; text-transform: uppercase; }
.onboarding-sub { text-align: center; color: #888; margin-bottom: 30px; }

.onboard-section { margin-bottom: 25px; }
.onboard-section label { display: block; color: var(--text-dim); font-size: 0.8rem; font-weight: bold; text-transform: uppercase; margin-bottom: 10px; letter-spacing: 1px; }

.option-grid { display: flex; flex-direction: column; gap: 10px; }
.option-card { display: flex; align-items: center; gap: 15px; background: #252525; padding: 15px; border-radius: 12px; border: 2px solid #333; cursor: pointer; transition: all 0.2s; }
.option-card .opt-icon { font-size: 1.8rem; }
.option-card .opt-info strong { display: block; color: #fff; margin-bottom: 3px; }
.option-card .opt-info p { margin: 0; color: #888; font-size: 0.85rem; }

.option-card.selected { border-color: var(--primary); background: rgba(76, 175, 80, 0.1); }
.option-card:hover { border-color: #555; }

.divider { border: 0; border-top: 1px solid #333; margin: 20px 0; }

.styled-select, .styled-input { 
    width: 100%; 
    background: #1e1e1e; 
    border: 1px solid #444; 
    color: white; 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 1rem; 
    outline: none; 
    box-sizing: border-box; /* IMPORTANT: Ensures padding doesn't expand width */
}
.styled-select:focus, .styled-input:focus { border-color: var(--primary); }

.input-with-icon { 
    position: relative; 
    width: 100%; /* IMPORTANT: Constrains wrapper */
}
.input-with-icon .input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); opacity: 0.5; }
.input-with-icon input { 
    padding-left: 45px; 
}

.tiny-note { font-size: 0.75rem; color: #666; margin-top: 8px; font-style: italic; }
.onboard-actions { margin-top: 30px; }

/* --- ONBOARDING UPDATE --- */
.toggle-row { display: flex; gap: 10px; margin-bottom: 15px; }
.toggle-btn { flex: 1; padding: 10px; background: #252525; border: 1px solid #444; color: #888; border-radius: 8px; cursor: pointer; font-size: 0.9rem; }
.toggle-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: bold; }

.manual-log-box { background: #252525; padding: 15px; border-radius: 8px; border: 1px solid #333; margin-bottom: 15px; }
.manual-row { display: flex; gap: 10px; margin-bottom: 10px; }
.compact { padding: 8px 12px; font-size: 0.9rem; }

.small-btn { padding: 8px; font-size: 0.8rem; width: 100%; }

.log-list-preview { max-height: 200px; overflow-y: auto; border: 1px solid #333; border-radius: 8px; padding: 10px; background: #1a1a1a; }
.preview-item { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-bottom: 1px solid #333; font-size: 0.85rem; color: #ccc; }
.preview-item:last-child { border-bottom: none; }
.preview-del { color: var(--danger); cursor: pointer; font-weight: bold; padding: 5px; }
.empty-state-text { text-align: center; color: #555; font-style: italic; padding: 20px 0; font-size: 0.8rem; }

.modal-sub {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.card-action-btn { position: absolute; top: 0; right: 0; bottom: 0; width: 90px; background: var(--accent); color: white; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 2rem; z-index: 1; cursor: pointer; border-radius: 0 13px 13px 0; }

/* MOBILE (Touch): Card slides left to reveal button */
@media (pointer: coarse) {
    .history-card.swiped { transform: translateX(-80px); }
}

/* DESKTOP (Mouse): Button sits next to card */
@media (pointer: fine) {
    .history-item-wrapper { display: flex; gap: 10px; overflow: visible; align-items: center; }
    .card-action-btn { position: static; width: auto; height: 40px; padding: 0 15px; background: transparent; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; font-size: 1.5rem;}
    .card-action-btn:hover { background: var(--accent); color: white; }
    .history-card { flex-grow: 1; }
}