:root {
    --bg-gradient-start: #1a1a2e;
    --bg-gradient-end: #16213e;
    --invest-primary: #00d4aa;
    --invest-secondary: #00a885;
    --invest-glow: rgba(0, 212, 170, 0.4);
    --consume-primary: #ff6b6b;
    --consume-secondary: #ee5a5a;
    --consume-glow: rgba(255, 107, 107, 0.4);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    font-family: 'DM Sans', sans-serif;
    display: flex;
    overflow-x: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    margin-left: 50px; /* Account for collapsed history drawer */
}

.sidebar {
    width: 280px;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 25px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.sidebar-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

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

.sidebar-stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.sidebar-stat-value.invest { color: var(--invest-primary); }
.sidebar-stat-value.consume { color: var(--consume-primary); }

.sidebar-total {
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.sidebar-total-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.sidebar-total-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-btn {
    width: 100%;
    padding: 14px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-btn.reset {
    color: var(--text-secondary);
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.sidebar-btn.reset:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--consume-primary);
    color: var(--consume-primary);
}

/* Timeline styles */
.timeline-container {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.timeline-container::-webkit-scrollbar {
    width: 4px;
}

.timeline-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.timeline-empty {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    padding: 15px;
    opacity: 0.6;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 65px;
    font-family: 'DM Sans', sans-serif;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.timeline-dot.invest {
    background: var(--invest-primary);
    box-shadow: 0 0 8px var(--invest-glow);
}

.timeline-dot.consume {
    background: var(--consume-primary);
    box-shadow: 0 0 8px var(--consume-glow);
}

.timeline-label {
    font-size: 0.8rem;
    color: var(--text-primary);
}

.timeline-item.invest .timeline-label {
    color: var(--invest-primary);
}

.timeline-item.consume .timeline-label {
    color: var(--consume-primary);
}

.sidebar-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

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

.setting-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-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='%23ffffff' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.setting-select:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.15);
}

.setting-select:focus {
    outline: none;
    border-color: var(--invest-primary);
}

.setting-select option {
    background: #1a1a2e;
    color: var(--text-primary);
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 170, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.sidebar-reset {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    margin-bottom: 20px;
}

.sidebar-reset:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: var(--consume-primary);
    color: var(--consume-primary);
}

.sidebar-reset .reset-icon {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.sidebar-reset:hover .reset-icon {
    transform: rotate(-180deg);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

.subtitle span {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-left: 8px;
    font-size: 0.9rem;
}

.current-date {
    color: var(--invest-primary);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

/* Date Navigation */
.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.date-nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.date-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.date-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.date-display-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.date-picker-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.date-picker-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

#date-picker {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

.viewing-past-banner {
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2), rgba(230, 126, 34, 0.2));
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #f39c12;
}

.viewing-past-banner button {
    background: rgba(0, 212, 170, 0.2);
    border: 1px solid var(--invest-primary);
    color: var(--invest-primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.viewing-past-banner button:hover {
    background: var(--invest-primary);
    color: #fff;
}

/* History Drawer - Always visible, collapsed by default */
.history-drawer-overlay {
    position: fixed;
    top: 0;
    left: 50px;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.history-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.history-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 50px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-drawer.active {
    width: 280px;
}

/* Collapsed state - show expand icon */
.history-drawer-collapsed {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 15px;
    gap: 8px;
    cursor: pointer;
}

.history-drawer.active .history-drawer-collapsed {
    display: none;
}

.history-expand-icon {
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}

.history-drawer-collapsed:hover .history-expand-icon {
    opacity: 1;
    transform: scale(1.1);
}

.history-collapsed-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 10px;
}

/* Hide content when collapsed */
.history-drawer-header,
.history-drawer-content,
.history-load-more {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.history-drawer.active .history-drawer-header,
.history-drawer.active .history-drawer-content,
.history-drawer.active .history-load-more {
    opacity: 1;
    visibility: visible;
}

.history-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-drawer-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0;
}

.history-drawer-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.history-drawer-close:hover {
    color: var(--text-primary);
}

.history-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.history-day-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-left: 3px solid transparent;
}

.history-day-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.history-day-item.active {
    background: rgba(0, 212, 170, 0.1);
    border-left-color: var(--invest-primary);
}

.history-day-item.today {
    position: relative;
}

.history-day-date {
    flex: 1;
}

.history-day-label {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.history-day-sublabel {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.history-day-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.history-day-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
}

.history-day-stat.invest {
    color: var(--invest-primary);
}

.history-day-stat.consume {
    color: var(--consume-primary);
}

.history-day-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.history-day-dot.invest {
    background: var(--invest-primary);
}

.history-day-dot.consume {
    background: var(--consume-primary);
}

.history-load-more {
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 15px 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-align: center;
    width: 100%;
}

.history-load-more:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.jars-container {
    display: flex;
    gap: 80px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Single unified jar container */
.single-jar-container {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.jar-section.unified {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.dual-controls {
    display: flex;
    gap: 60px;
    justify-content: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.control-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dual-stats {
    display: flex;
    gap: 60px;
    justify-content: center;
    margin-top: 10px;
}

.stat-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    min-width: 140px;
}

.stat-group.invest {
}

.stat-group.consume {
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-group .stat-count {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
}

.stat-group .stat-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Activity Log - Full timeline below jar */
.activity-log {
    width: 100%;
    max-width: 600px;
    margin-top: 30px;
}

.activity-log-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    text-align: center;
}

.activity-log-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 15px;
}

.activity-log-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-size: 0.9rem;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.activity-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 60px;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.activity-dot.invest {
    background: var(--invest-primary);
}

.activity-dot.consume {
    background: var(--consume-primary);
}

.activity-content {
    flex: 1;
}

.activity-duration {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-duration.invest {
    color: var(--invest-primary);
}

.activity-duration.consume {
    color: var(--consume-primary);
}

.activity-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}

.jar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.jar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.jar-label {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.jar-label.invest { color: var(--invest-primary); }
.jar-label.consume { color: var(--consume-primary); }

.info-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.info-btn svg {
    width: 100%;
    height: 100%;
}

.info-btn.invest {
    color: var(--invest-primary);
}

.info-btn.consume {
    color: var(--consume-primary);
}

.info-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Info Tooltip */
.info-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 420px;
    background: linear-gradient(145deg, #1e2a4a, #1a1a2e);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.info-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.info-tooltip-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-tooltip-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.info-tooltip-title.invest { color: var(--invest-primary); }
.info-tooltip-title.consume { color: var(--consume-primary); }

.info-tooltip-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-tooltip-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.info-tooltip-content {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.info-tooltip-content p {
    margin-bottom: 15px;
}

.info-tooltip-content p:last-child {
    margin-bottom: 0;
}

.info-tooltip-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.info-tooltip-examples {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border-left: 3px solid;
}

.info-tooltip-examples.invest {
    border-left-color: var(--invest-primary);
}

.info-tooltip-examples.consume {
    border-left-color: var(--consume-primary);
}

.info-tooltip-examples-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.info-tooltip-examples ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.info-tooltip-examples li {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Overlay */
.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.info-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Marble styles moved to css/marble/marble.css */

/* Description popup */
.comment-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 380px;
    background: linear-gradient(145deg, #1e2a4a, #1a1a2e);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.comment-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.comment-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comment-popup-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-popup-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.comment-popup-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.comment-popup-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.comment-popup-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.comment-popup-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.comment-popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: flex-end;
}

.comment-popup-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-popup-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.comment-popup-btn.cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.comment-popup-btn.save {
    background: var(--invest-primary);
    color: #000;
}

.comment-popup-btn.save:hover {
    background: var(--invest-secondary);
}


.add-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.add-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.add-btn:hover::before {
    width: 100%;
    height: 100%;
}

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

.add-btn.invest {
    background: linear-gradient(135deg, var(--invest-primary), var(--invest-secondary));
    color: #fff;
    box-shadow: 0 8px 25px var(--invest-glow);
}

.add-btn.invest:hover {
    box-shadow: 0 12px 35px var(--invest-glow);
    transform: translateY(-2px);
}

.add-btn.consume {
    background: linear-gradient(135deg, var(--consume-primary), var(--consume-secondary));
    color: #fff;
    box-shadow: 0 8px 25px var(--consume-glow);
}

.add-btn.consume:hover {
    box-shadow: 0 12px 35px var(--consume-glow);
    transform: translateY(-2px);
}

.add-btn:disabled {
    background: #444;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
    transform: none;
}

.add-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.add-btn.timer-running {
    font-size: 0.85rem !important;
    font-weight: 700;
    font-family: 'DM Sans', monospace;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    animation: timerPulse 1s ease infinite;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5) !important;
}

.add-btn.timer-running:hover {
    transform: scale(1.05);
}

.add-btn.timer-running .timer-time {
    display: block;
}

@keyframes timerPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(243, 156, 18, 0.5); }
    50% { box-shadow: 0 0 30px rgba(243, 156, 18, 0.8); }
}

/* Active Timer View - replaces dual-controls when timer is running */
.active-timer-view {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    gap: 8px;
}

.active-timer-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.active-timer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.active-timer-type {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 10px;
    white-space: nowrap;
}

.active-timer-type.invest {
    color: var(--invest-primary);
    background: rgba(46, 204, 113, 0.15);
}

.active-timer-type.consume {
    color: var(--consume-primary);
    background: rgba(231, 76, 60, 0.15);
}

.active-timer-activity-input {
    font-size: 0.95rem;
    font-weight: 400;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
    min-height: 38px;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.2s ease, background 0.2s ease;
    resize: none;
    line-height: 1.4;
    box-sizing: border-box;
    overflow: hidden;
}

.active-timer-activity-input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.active-timer-activity-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
}

.active-timer-activity-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.active-timer-char-count {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: right;
    margin-top: 4px;
}

.active-timer-char-count.warning {
    color: #f39c12;
}

.active-timer-char-count.danger {
    color: var(--consume-primary);
}

.active-timer-display {
    font-size: 2rem;
    font-weight: 700;
    font-family: 'DM Sans', monospace;
    font-variant-numeric: tabular-nums;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    min-width: 5.5ch; /* Fixed width for MM:SS */
}

.active-timer-controls {
    display: flex;
    gap: 8px;
}

.active-timer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.active-timer-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.active-timer-btn.cancel:hover {
    background: rgba(231, 76, 60, 0.3);
    border-color: var(--consume-primary);
    color: #fff;
}

.active-timer-btn.stop {
    background: linear-gradient(135deg, var(--invest-primary), var(--invest-secondary));
    color: #fff;
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.4);
}

.active-timer-btn.stop:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.5);
}

.active-timer-btn.stop.consume {
    background: linear-gradient(135deg, var(--consume-primary), var(--consume-secondary));
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.4);
}

.active-timer-btn.stop.consume:hover {
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.5);
}

/* Timer Comment Popup */
.timer-comment-popup {
    max-width: 400px;
}

.timer-popup-time {
    text-align: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 20px;
}

.timer-popup-time span {
    font-weight: 700;
    color: var(--invest-primary);
}

.timer-popup-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1.1rem;
    font-family: 'DM Sans', sans-serif;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.timer-popup-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.timer-popup-input:focus {
    outline: none;
    border-color: var(--invest-primary);
}

.add-btn.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* Compact Timer */
.timer-compact {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.timer-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.timer-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--invest-primary);
}

.timer-toggle-btn.running {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--invest-primary);
    color: var(--invest-primary);
}

.timer-toggle-btn.running #timer-display-mini {
    font-weight: 700;
    font-family: 'DM Sans', monospace;
}

.timer-icon {
    font-size: 1.2rem;
}

.timer-stop-mini {
    padding: 10px 16px;
    background: var(--consume-primary);
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-stop-mini:hover {
    background: #c0392b;
}

.timer-add-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-result {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 15px;
}

.timer-result span {
    font-weight: 700;
    color: var(--invest-primary);
}

.timer-comment-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    font-family: 'DM Sans', sans-serif;
    margin-bottom: 15px;
    box-sizing: border-box;
}

.timer-comment-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.timer-type-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.timer-type-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-type-btn.invest {
    background: var(--invest-primary);
    color: #fff;
}

.timer-type-btn.consume {
    background: var(--consume-primary);
    color: #fff;
}

.timer-type-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.timer-cancel-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.timer-cancel-btn:hover {
    border-color: var(--consume-primary);
    color: var(--consume-primary);
}

/* Test Panel */
.test-panel {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.test-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 600;
    color: #f39c12;
}

.test-panel-header button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 1.2rem;
}

.test-panel-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.test-panel-buttons button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.test-panel-buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.test-panel-buttons button.danger {
    background: rgba(231, 76, 60, 0.3);
}

.test-panel-buttons button.danger:hover {
    background: rgba(231, 76, 60, 0.5);
}

.test-panel-custom {
    display: flex;
    gap: 8px;
    align-items: center;
}

.test-panel-custom input,
.test-panel-custom select {
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 0.85rem;
}

.test-panel-custom input {
    width: 80px;
}

.test-panel-custom button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: var(--invest-primary);
    color: #fff;
    cursor: pointer;
}

.test-panel-custom button.invest {
    background: var(--invest-primary);
}

.test-panel-custom button.consume {
    background: var(--consume-primary);
}

.test-panel-header .clear-btn {
    background: rgba(231, 76, 60, 0.4);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem !important;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
}

.test-panel-header .clear-btn:hover {
    background: rgba(231, 76, 60, 0.5);
}

.test-scenario {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.test-scenario-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.test-scenario-title {
    font-weight: 600;
    color: #fff;
}

.test-scenario-desc {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
}

.test-scenario-desc strong {
    color: #f39c12;
}

.run-btn {
    background: var(--invest-primary);
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}

.run-btn:hover {
    opacity: 0.9;
}

.stats {
    margin-top: 15px;
    text-align: center;
}

.stat-count {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.stat-count.invest { color: var(--invest-primary); }
.stat-count.consume { color: var(--consume-primary); }

.stat-time {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 25px 20px;
    }

    .sidebar-title {
        width: 100%;
        text-align: center;
        border-bottom: none;
        padding-bottom: 10px;
    }

    .sidebar-section {
        flex-direction: row;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sidebar-stat {
        min-width: 140px;
    }

    .sidebar-total {
        min-width: 150px;
    }

    .sidebar-actions {
        margin-top: 0;
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }

    .sidebar-btn {
        width: auto;
        min-width: 150px;
    }
}

@media (max-width: 600px) {
    .jars-container {
        gap: 40px;
    }

    .marble {
        width: 22px;
        height: 22px;
    }
}

/* Jar full notification animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Version tag */
.version-tag {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'DM Sans', sans-serif;
    z-index: 100;
}

/* Feedback Form */
.feedback-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000;
}

.feedback-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.feedback-toggle-icon {
    display: flex;
    align-items: center;
}

.feedback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
}

.feedback-overlay.active {
    opacity: 1;
    visibility: visible;
}

.feedback-form {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    background: #12121f;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.2s ease;
    z-index: 1002;
}

.feedback-form.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.feedback-header h3 {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.feedback-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
}

.feedback-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.feedback-type-toggle {
    display: flex;
    padding: 8px 14px;
    gap: 6px;
}

.feedback-type-btn {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
}

.feedback-type-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.feedback-type-btn.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.feedback-body {
    padding: 0 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feedback-title {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.feedback-title:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.feedback-title::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.feedback-description {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.4;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.feedback-description:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.feedback-description::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.feedback-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.feedback-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.feedback-upload-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#feedback-image {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.feedback-email {
    flex: 1;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.feedback-email:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
}

.feedback-email::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.feedback-image-preview {
    display: none;
    position: relative;
}

.feedback-image-preview.has-image {
    display: block;
}

.feedback-image-preview img {
    max-width: 100%;
    max-height: 100px;
    border-radius: 8px;
}

.feedback-image-preview .remove-image {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    background: var(--consume-primary);
    border: 2px solid #12121f;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-footer {
    padding: 0 14px 10px;
}

.feedback-hint {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    min-height: 1.2em;
}

.feedback-submit {
    width: 100%;
    padding: 10px;
    background: #fff;
    border: none;
    border-radius: 6px;
    color: #12121f;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
}

.feedback-submit:hover {
    opacity: 0.9;
}

.feedback-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback-submit.success {
    background: var(--invest-primary);
    color: #fff;
}

.feedback-submit.error {
    background: var(--consume-primary);
    color: #fff;
}

