:root {
    --primary: #2D5A4A;
    --primary-light: #3D7A64;
    --secondary: #8FB89A;
    --accent: #E8A87C;
    --background: #FAF8F5;
    --surface: #FFFFFF;
    --text-primary: #2C3E2D;
    --text-secondary: #7A8B7A;
    --success: #6AAF75;
    --warning: #E6B566;
    --tomato: #E07B6C;
    --tree-1: #4A7C59;
    --tree-2: #5D9B6D;
    --tree-3: #7BC47F;
    --tree-4: #A8D5A2;
    --shadow-sm: 0 1px 2px rgba(45, 90, 74, 0.05);
    --shadow-md: 0 4px 12px rgba(45, 90, 74, 0.08);
    --shadow-lg: 0 8px 24px rgba(45, 90, 74, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Skin variables - default values */
    --skin-primary: var(--primary);
    --skin-primary-light: var(--primary-light);
    --skin-secondary: var(--secondary);
    --skin-accent: var(--accent);
    --skin-background: var(--background);
    --skin-surface: var(--surface);
    --skin-text-primary: var(--text-primary);
    --skin-text-secondary: var(--text-secondary);
    --skin-success: var(--success);
    --skin-warning: var(--warning);
    --skin-tomato: var(--tomato);
    --skin-shadow-color: rgba(45, 90, 74, 0.15);
    --skin-ring-color: var(--primary);
}

.skin-active {
    --primary: var(--skin-primary);
    --primary-light: var(--skin-primary-light);
    --secondary: var(--skin-secondary);
    --accent: var(--skin-accent);
    --background: var(--skin-background);
    --surface: var(--skin-surface);
    --text-primary: var(--skin-text-primary);
    --text-secondary: var(--skin-text-secondary);
    --success: var(--skin-success);
    --warning: var(--skin-warning);
    --tomato: var(--skin-tomato);
    --shadow-sm: 0 1px 2px var(--skin-shadow-color);
    --shadow-md: 0 4px 12px var(--skin-shadow-color);
    --shadow-lg: 0 8px 24px var(--skin-shadow-color);
}

.skin-active .ring-progress {
    stroke: var(--skin-ring-color);
}

.skin-active .ring-bg {
    stroke: color-mix(in srgb, var(--skin-primary) 15%, transparent);
}

/* Skin - full page styling */
.skin-active body {
    background: var(--background);
}

.skin-active .sidebar {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--primary) 10%, transparent);
}

.skin-active .streak-display {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 15%, var(--surface)), color-mix(in srgb, var(--accent) 5%, var(--surface)));
}

.skin-active .streak-icon {
    background: var(--accent);
}

.skin-active .streak-count {
    color: var(--accent);
}

.skin-active .streak-label {
    color: var(--text-secondary);
}

.skin-active .sidebar-achievements {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 5%, var(--surface)) 0%, color-mix(in srgb, var(--primary) 10%, var(--surface)) 100%);
    border-color: color-mix(in srgb, var(--primary) 10%, transparent);
}

.skin-active .achievement-badge-icon {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, white));
}

.skin-active .nav-item.active {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
}

.skin-active .nav-item.active::before {
    background: var(--primary);
}

.skin-active .mode-tab.active {
    background: var(--primary);
}

.skin-active .btn-primary {
    background: var(--primary);
}

.skin-active .btn-primary:hover {
    background: var(--primary-light);
}

.skin-active .task-tab.active {
    background: var(--primary);
}

.skin-active .stat-tab.active {
    background: var(--primary);
}

.skin-active .stat-card.main {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
}

.skin-active .gallery-stats .stat-value {
    color: var(--primary);
}

.skin-active .card-frame .frame-corner {
    border-color: var(--primary);
}

.skin-active .card-status-badge {
    background: var(--primary);
}

.skin-active .card-available-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.skin-active .card-unlock-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.skin-active .progress-current {
    color: var(--accent);
}

.skin-active .progress-bar-fill {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.skin-active .stat-panel::before {
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.skin-active .stat-panel .stat-value {
    color: var(--primary);
}

.skin-active .gallery-toast {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.skin-active .gallery-toast::before {
    background: var(--accent);
}

.skin-active .notification-toast {
    border-left-color: var(--accent);
}

.skin-active .showcase-btn {
    background: var(--primary);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid rgba(45, 90, 74, 0.08);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background: rgba(45, 90, 74, 0.06);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(45, 90, 74, 0.1);
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.streak-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(232, 168, 124, 0.15), rgba(232, 168, 124, 0.05));
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.streak-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.streak-icon i {
    width: 24px;
    height: 24px;
}

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

.streak-count {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

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

.sidebar-achievements {
    flex: 1;
    min-height: 120px;
    background: linear-gradient(180deg, rgba(45, 90, 74, 0.05) 0%, rgba(45, 90, 74, 0.1) 100%);
    border-radius: var(--radius-lg);
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgba(45, 90, 74, 0.08);
}

.achievements-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(45, 90, 74, 0.08);
}

.achievements-title {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

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

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--surface);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: default;
}

.achievement-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.achievement-badge.locked {
    opacity: 0.4;
}

.achievement-badge-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #F0C4A8);
    color: white;
}

.achievement-badge.locked .achievement-badge-icon {
    background: rgba(45, 90, 74, 0.15);
    color: var(--text-secondary);
}

.achievement-badge-icon svg {
    width: 16px;
    height: 16px;
}

.achievement-badge-name {
    font-size: 0.5625rem;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

.achievement-badge.locked .achievement-badge-name {
    color: var(--text-secondary);
}

/* 侧边栏成就解锁高亮 */
.achievement-badge.just-unlocked {
    animation: sidebarAchievementGlow 1.5s ease-out;
}

@keyframes sidebarAchievementGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    }
    30% {
        box-shadow: 0 0 12px 4px rgba(245, 158, 11, 0.5);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px 48px;
    max-width: calc(100% - 260px);
}

.view {
    opacity: 1;
}

.view.hidden,
.hidden {
    display: none !important;
}

.view > h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.timer-container {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    background: var(--surface);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.mode-tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.mode-tab:hover {
    color: var(--text-primary);
}

.mode-tab.active {
    background: var(--primary);
    color: white;
}

.timer-ring-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 32px;
}

.timer-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(45, 90, 74, 0.1);
    stroke-width: 8;
}

.ring-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 816.81;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.ring-progress.break {
    stroke: var(--secondary);
}

.timer-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    background: transparent;
}

.timer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
}

.timer-digit-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.timer-digit {
    width: 44px;
    height: 72px;
    overflow: hidden;
    position: relative;
    cursor: ns-resize;
    user-select: none;
    background: transparent;
}

.timer-digit::before,
.timer-digit::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 28px;
    pointer-events: none;
    z-index: 2;
    background: transparent;
}

.timer-digit::before {
    top: 0;
}

.timer-digit::after {
    bottom: 0;
}

.digit-roller {
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease-out;
    transform: translateY(-360px);
    background: transparent;
}

.digit-roller span {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 72px;
    background: transparent;
}

.timer-digit.highlight .digit-roller span {
    color: var(--primary);
}

.timer-separator {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 2px;
    line-height: 72px;
}

.timer-mode-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 12px;
}

.timer-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    backdrop-filter: blur(4px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    z-index: 10;
    cursor: text;
}

.timer-edit-overlay.active {
    display: flex;
}

.timer-edit-overlay input {
    width: 160px;
    border: 2px solid var(--primary);
    background: var(--background);
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    outline: none;
    letter-spacing: 2px;
}

.timer-edit-overlay input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.timer-edit-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.timer-display {
    position: relative;
}

.timer-duration-selector {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
}

.duration-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.duration-control > label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.duration-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--surface);
    border: 1px solid rgba(45, 90, 74, 0.12);
    border-radius: var(--radius-md);
    padding: 4px;
}

.duration-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.duration-btn:hover {
    background: rgba(45, 90, 74, 0.08);
    color: var(--primary);
}

.duration-btn i {
    width: 16px;
    height: 16px;
}

.duration-input {
    width: 48px;
    height: 32px;
    border: none;
    background: transparent;
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    -moz-appearance: textfield;
}

.duration-input::-webkit-outer-spin-button,
.duration-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.duration-input:focus {
    outline: none;
}

.duration-unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 4px;
}

.timer-tomato-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.timer-tomato-count strong {
    color: var(--tomato);
    font-weight: 600;
}

.timer-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.timer-controls .btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    flex-shrink: 0;
}

.timer-controls .btn-icon i {
    width: 20px;
    height: 20px;
}

.music-section {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.music-toggle {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--surface);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    color: var(--text-secondary);
}

.music-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.music-toggle i {
    width: 24px;
    height: 24px;
}

.music-toggle .music-icon-playing {
    color: var(--primary);
    animation: musicPulse 1.5s ease-in-out infinite;
}

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

.music-player-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-player-modal.open {
    display: flex;
    opacity: 1;
}

.music-player-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 360px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.music-player-modal.open .music-player-content {
    transform: scale(1);
}

.music-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.music-player-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.music-player-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.music-player-close:hover {
    background: rgba(45, 90, 74, 0.08);
    color: var(--text-primary);
}

.music-player-close i {
    width: 20px;
    height: 20px;
}

.music-current-track {
    text-align: center;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--background);
    border-radius: var(--radius-lg);
}

.music-track-name {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.music-player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.music-control-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--background);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.music-control-btn:hover {
    background: rgba(45, 90, 74, 0.1);
    color: var(--text-primary);
}

.music-control-btn i {
    width: 20px;
    height: 20px;
}

.music-play-btn {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: white;
}

.music-play-btn:hover {
    background: var(--primary-light);
    color: white;
}

.music-play-btn i {
    width: 28px;
    height: 28px;
}

.music-mode-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.music-mode-btn {
    padding: 8px 16px;
    border: 1px solid rgba(45, 90, 74, 0.15);
    background: var(--surface);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    transition: var(--transition);
}

.music-mode-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.music-mode-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.music-mode-btn i {
    width: 14px;
    height: 14px;
}

.music-volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--background);
    border-radius: var(--radius-lg);
}

.volume-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.volume-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(45, 90, 74, 0.15);
    border-radius: var(--radius-full);
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.volume-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
}

.music-playlist-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--background);
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition);
}

.music-playlist-toggle:hover {
    color: var(--text-primary);
}

.music-playlist-toggle i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.music-playlist {
    display: none;
    max-height: 240px;
    overflow-y: auto;
    margin-top: 8px;
    border-radius: var(--radius-lg);
    background: var(--background);
}

.music-playlist.open {
    display: block;
}

.playlist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(45, 90, 74, 0.05);
}

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

.playlist-item:hover {
    background: rgba(45, 90, 74, 0.05);
}

.playlist-item.active {
    background: rgba(45, 90, 74, 0.08);
}

.playlist-item.active .playlist-item-name {
    color: var(--primary);
    font-weight: 500;
}

.playlist-item-name {
    font-size: 0.875rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-playing-icon {
    width: 14px;
    height: 14px;
    color: var(--primary);
    flex-shrink: 0;
    animation: musicPulse 1.5s ease-in-out infinite;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn i {
    width: 18px;
    height: 18px;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(45, 90, 74, 0.06);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 12px;
}

.btn-ghost:hover {
    background: rgba(45, 90, 74, 0.06);
    color: var(--text-primary);
}

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

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

.btn-large {
    padding: 16px 48px;
    font-size: 1rem;
}

.btn-large i {
    width: 20px;
    height: 20px;
}

.custom-select {
    position: relative;
    display: inline-block;
    min-width: 160px;
}

.custom-select.small {
    min-width: 100px;
}

.custom-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid rgba(45, 90, 74, 0.12);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.custom-select-trigger:hover {
    border-color: rgba(45, 90, 74, 0.25);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}

.custom-select-trigger i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.custom-select.open .custom-select-trigger i {
    transform: rotate(180deg);
}

.custom-select-value {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid rgba(45, 90, 74, 0.12);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    max-height: 280px;
    overflow-y: auto;
}

.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-select-option:hover {
    background: rgba(45, 90, 74, 0.06);
}

.custom-select-option.selected {
    background: rgba(45, 90, 74, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.custom-select-option[data-color]::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--option-color);
}

.custom-select-option[data-color] {
    --option-color: var(--category-color);
}

.custom-select-divider {
    height: 1px;
    background: rgba(45, 90, 74, 0.08);
    margin: 4px 0;
}

.custom-select-options-list {
    max-height: 200px;
    overflow-y: auto;
}

.custom-select-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.task-link-section {
    max-width: 300px;
    margin: 0 auto;
}

.task-link-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.task-link-select {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(45, 90, 74, 0.15);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.task-link-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}

.task-link-custom {
    width: 100%;
    margin-top: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(45, 90, 74, 0.15);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    transition: var(--transition);
}

.task-link-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}

.session-history {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(45, 90, 74, 0.08);
}

.session-history h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.session-item-time {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.session-item-task {
    font-size: 0.875rem;
    color: var(--text-primary);
}

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

.tasks-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.task-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.task-tab.active {
    background: var(--primary);
    color: white;
}

.task-input-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.task-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(45, 90, 74, 0.1);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.task-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}

.task-category-select,
.task-priority-select {
    padding: 14px 16px;
    border: 1px solid rgba(45, 90, 74, 0.1);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    background: var(--surface);
    cursor: pointer;
    transition: var(--transition);
}

.task-category-select:focus,
.task-priority-select:focus {
    outline: none;
    border-color: var(--primary);
}

.tasks-filters {
    margin-bottom: 24px;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid rgba(45, 90, 74, 0.1);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    background: var(--surface);
    cursor: pointer;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.task-item:hover {
    box-shadow: var(--shadow-md);
}

.task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(45, 90, 74, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: var(--transition);
}

.task-checkbox:hover {
    border-color: var(--primary);
}

.task-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
}

.task-checkbox i {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
}

.task-checkbox.checked i {
    opacity: 1;
}

.task-content {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.task-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.task-badge {
    padding: 2px 6px;
    background: rgba(232, 168, 124, 0.2);
    color: #C4875A;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.625rem;
}

.monthly-badge {
    background: linear-gradient(135deg, #4A7C59, #6AAF75);
    color: white;
    padding: 4px 10px;
    font-size: 0.6875rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-star {
    font-size: 0.75rem;
}

.task-item.monthly-completed {
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.08), rgba(74, 124, 89, 0.04));
    border-left: 3px solid #4A7C59;
}

.task-item.monthly-completed .task-title {
    color: #4A7C59;
}

.task-item.monthly-item {
    border-left: 3px solid #6AAF75;
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.05), transparent);
}

.task-category {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.75rem;
}

.task-category.work {
    background: rgba(224, 123, 108, 0.15);
    color: #C45A4A;
}

.task-category.study {
    background: rgba(106, 175, 117, 0.15);
    color: #4A8A4D;
}

.task-category.health {
    background: rgba(230, 181, 102, 0.15);
    color: #B08A4A;
}

.task-category.sports {
    background: rgba(93, 155, 109, 0.15);
    color: #3D7A4D;
}

.task-category.life {
    background: rgba(143, 184, 154, 0.15);
    color: #5A8A5A;
}

.task-category.writing {
    background: rgba(155, 138, 203, 0.15);
    color: #7A68AB;
}

.task-category.future {
    background: rgba(106, 170, 170, 0.15);
    color: #4A8A8A;
}

.task-category.rest {
    background: rgba(168, 213, 162, 0.15);
    color: #6A9A6A;
}

.task-priority {
    font-weight: 600;
}

.task-priority.p1 {
    color: var(--tomato);
}

.task-priority.p2 {
    color: var(--warning);
}

.task-priority.p3 {
    color: var(--secondary);
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: var(--transition);
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.task-action-btn:hover {
    background: rgba(45, 90, 74, 0.06);
    color: var(--text-primary);
}

.task-action-btn.delete:hover {
    background: rgba(224, 123, 108, 0.1);
    color: var(--tomato);
}

.task-action-btn i {
    width: 16px;
    height: 16px;
}

/* ==================== Gallery - Game UI Style ==================== */

.gallery-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.gallery-header::before,
.gallery-header::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.gallery-header::before {
    left: calc(50% - 280px);
}

.gallery-header::after {
    right: calc(50% - 280px);
}

.gallery-subtitle {
    color: var(--text-secondary);
    margin-top: 12px;
    font-size: 0.9375rem;
    letter-spacing: 0.1em;
}

/* Stats Panel - Game Style */
.gallery-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 48px;
}

.stat-panel {
    position: relative;
    background: var(--surface);
    border: 1px solid rgba(45, 90, 74, 0.15);
    padding: 20px 32px;
    min-width: 140px;
    text-align: center;
    clip-path: polygon(
        0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px,
        100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px)
    );
    transition: var(--transition);
}

.stat-panel:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
}

.stat-panel-inner {
    position: relative;
    z-index: 1;
}

.stat-panel .stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1.2;
}

.stat-panel .stat-value.current {
    font-size: 1.25rem;
    color: var(--accent);
}

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

.stat-panel-decor {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--secondary);
    border-bottom: 2px solid var(--secondary);
}

/* Gallery Container */
.gallery-container {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* Background Decorations */
.gallery-bg-decor {
    position: absolute;
    inset: -40px;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.decor-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(45, 90, 74, 0.08), transparent);
    height: 1px;
}

.decor-line-1 {
    top: 20%;
    left: 0;
    right: 0;
}

.decor-line-2 {
    bottom: 20%;
    left: 0;
    right: 0;
}

.decor-diamond {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(45, 90, 74, 0.1);
    transform: rotate(45deg);
}

.decor-diamond-1 {
    top: 10%;
    left: 5%;
}

.decor-diamond-2 {
    bottom: 15%;
    right: 8%;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* ==================== Gallery Card - Game Style ==================== */

.gallery-card {
    aspect-ratio: 3/4;
    position: relative;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-card:hover {
    transform: translateY(-4px);
}

.gallery-card.unlocked:hover {
    transform: translateY(-4px);
}

.gallery-card.available {
    cursor: pointer;
}

.gallery-card.available:hover {
    transform: translateY(-8px) scale(1.02);
}

.gallery-card.locked {
    cursor: not-allowed;
}

.gallery-card.locked:hover {
    transform: none;
}

/* Card Frame - Game UI Corner Decor */
.card-frame {
    position: absolute;
    inset: -4px;
    pointer-events: none;
}

.frame-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    opacity: 0.6;
    transition: var(--transition);
}

.gallery-card:hover .frame-corner {
    opacity: 1;
}

.frame-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.frame-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.frame-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.frame-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.frame-border {
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(45, 90, 74, 0.1);
    transition: var(--transition);
}

.gallery-card:hover .frame-border {
    border-color: rgba(45, 90, 74, 0.3);
}

/* Card Inner */
.card-inner {
    width: 100%;
    height: 100%;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.4s ease;
}

.gallery-card:hover .card-inner {
    box-shadow: var(--shadow-lg), 0 0 30px rgba(45, 90, 74, 0.15);
}

.gallery-card.unlocked .card-inner {
    box-shadow: var(--shadow-md);
}

.gallery-card.unlocked.active {
    transform: translateY(-4px);
}

.gallery-card.unlocked.active .card-inner {
    box-shadow: var(--shadow-lg), 0 0 0 2px var(--accent), 0 0 25px rgba(232, 168, 124, 0.4);
}

.gallery-card.unlocked.active .frame-corner {
    border-color: var(--accent);
    opacity: 1;
}

.gallery-card.unlocked.active .frame-border {
    border-color: rgba(232, 168, 124, 0.3);
}

.gallery-card.unlocked.active .card-active-indicator {
    display: flex;
}

/* Card Image */
.card-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
}

.card-image.grayscale {
    filter: grayscale(100%) brightness(0.4);
    transform: scale(1.05);
}

.gallery-card:hover .card-image:not(.grayscale) {
    transform: scale(1.08);
}

.card-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 60%,
        transparent 100%
    );
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-card.unlocked:hover .card-shine {
    opacity: 1;
    animation: shineMove 1.5s ease-in-out infinite;
}

@keyframes shineMove {
    0% { transform: rotate(30deg) translateX(-100%); }
    100% { transform: rotate(30deg) translateX(100%); }
}

/* Card Overlay for Unlocked */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card.unlocked:hover .card-overlay {
    opacity: 1;
}

.card-name-plate {
    background: linear-gradient(135deg, rgba(45, 90, 74, 0.9), rgba(45, 90, 74, 0.7));
    padding: 8px 16px;
    display: inline-block;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    margin-bottom: 8px;
}

.card-name {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.card-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.card-status-badge.active {
    background: linear-gradient(135deg, var(--accent), #F0C4A8);
}

.card-action-hint {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
}

.card-active-glow {
    position: absolute;
    inset: -2px;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    animation: activeGlow 2s ease-in-out infinite;
}

@keyframes activeGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(45, 90, 74, 0.3); }
    50% { box-shadow: 0 0 20px rgba(45, 90, 74, 0.5); }
}

.card-active-indicator {
    display: none;
    position: absolute;
    inset: 8px;
    pointer-events: none;
    z-index: 5;
}

.card-active-indicator .indicator-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--accent);
}

.card-active-indicator .indicator-corner.tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.card-active-indicator .indicator-corner.tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.card-active-indicator .indicator-corner.bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.card-active-indicator .indicator-corner.br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Locked State */
.card-image-container.locked {
    position: relative;
}

.card-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-icon-container {
    width: 48px;
    height: 48px;
    background: rgba(45, 90, 74, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
}

.lock-icon {
    width: 24px;
    height: 24px;
}

/* Available Badge */
.card-available-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #4A7C59, #6AAF75);
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Unlock Button - Game Style */
.card-unlock-btn {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary), #3A6B4A);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    clip-path: polygon(
        0 4px, 4px 0, calc(100% - 4px) 0, 100% 4px,
        100% calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 0 calc(100% - 4px)
    );
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.card-unlock-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.card-unlock-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 4px 20px rgba(45, 90, 74, 0.4);
}

.card-unlock-btn:hover::before {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-unlock-btn:hover .btn-glow {
    opacity: 1;
}

/* Progress Bar */
.card-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.card-progress-container.locked-progress {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.progress-label {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.progress-current {
    color: var(--primary);
    font-weight: 600;
}

.progress-sep {
    color: rgba(255, 255, 255, 0.5);
}

.progress-required {
    color: rgba(255, 255, 255, 0.7);
}

.progress-bar-wrapper {
    position: relative;
}

.progress-bar-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px 2px 0 0;
}

.progress-bar-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-20px); }
    100% { transform: translateX(calc(100% + 20px)); }
}

/* ==================== Animations ==================== */

/* Flip Animation */
.gallery-card.flipping .card-inner {
    animation: cardFlip 0.8s ease-in-out;
}

@keyframes cardFlip {
    0% { transform: perspective(800px) rotateY(0deg); }
    50% { transform: perspective(800px) rotateY(90deg); }
    100% { transform: perspective(800px) rotateY(0deg); }
}

/* Energy Bar Animation */
.energy-inject-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(to top, var(--primary), var(--secondary), var(--accent));
    z-index: 10;
    opacity: 0.6;
}

.energy-inject-bar.filling {
    animation: energyFill 1s ease-out forwards;
}

@keyframes energyFill {
    0% { height: 0; }
    100% { height: 100%; }
}

/* Floating Particles */
.float-particle {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3000;
}

/* Reveal Particles */
.reveal-particle {
    position: fixed;
    border-radius: 2px;
    pointer-events: none;
    z-index: 3000;
    transform-origin: center;
}

/* Revealer Overlay */
.card-revealer {
    position: absolute;
    inset: 0;
    background: var(--primary);
    z-index: 20;
    animation: revealerShrink 0.6s ease-out forwards;
    transform-origin: center;
}

@keyframes revealerShrink {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

/* ==================== Toast - Game Style ==================== */

.gallery-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: linear-gradient(135deg, var(--primary), #3A6B4A);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg), 0 0 20px rgba(45, 90, 74, 0.3);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 4000;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.gallery-toast::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: toastDotPulse 1s ease-in-out infinite;
}

@keyframes toastDotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.toast-icon {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* ==================== Skin Showcase - Game UI ==================== */

.gallery-skin-showcase {
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.gallery-skin-showcase.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.showcase-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid rgba(45, 90, 74, 0.15);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg), 0 0 60px var(--skin-shadow-color);
    position: relative;
    overflow: hidden;
}

.showcase-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}

.showcase-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle at bottom right, var(--skin-shadow-color) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.showcase-image-wrapper {
    position: relative;
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.showcase-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.showcase-image-wrapper:hover .showcase-image {
    transform: scale(1.08);
}

.showcase-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 60%,
        transparent 100%
    );
    animation: showcaseShine 3s ease-in-out infinite;
}

@keyframes showcaseShine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(200%) rotate(30deg); }
}

.showcase-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.showcase-frame .frame-corner {
    border-color: var(--accent);
    opacity: 0.8;
}

.showcase-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.showcase-label {
    font-size: 0.6875rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
}

.showcase-name {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

.showcase-btn {
    align-self: flex-start;
    padding: 10px 20px;
    background: var(--primary);
    border: 2px solid var(--primary);
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    clip-path: polygon(
        0 6px, 6px 0, calc(100% - 6px) 0, 100% 6px,
        100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px)
    );
}

.showcase-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--skin-shadow-color);
}

/* Responsive */
@media (max-width: 600px) {
    .showcase-inner {
        flex-direction: column;
        text-align: center;
    }

    .showcase-image-wrapper {
        width: 160px;
        height: 120px;
    }

    .showcase-btn {
        align-self: center;
    }
}

/* ==================== Responsive ==================== */

@media (max-width: 768px) {
    .gallery-stats {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .stat-panel {
        width: 200px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .gallery-header::before,
    .gallery-header::after {
        display: none;
    }
}

.skin-active::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: var(--skin-image);
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    pointer-events: none;
    z-index: -1;
}

.skin-active::after {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.1), rgba(74, 124, 89, 0.05));
    pointer-events: none;
    z-index: -1;
}

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

.forest-container {
    background: linear-gradient(180deg, #E8F4EC 0%, #D4EBD8 100%);
    border-radius: var(--radius-xl);
    padding: 48px;
    margin-bottom: 48px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.forest-ground {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, #C4DBC6 0%, #B5D0B6 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.trees-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.tree-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.tree-item:hover {
    transform: translateY(-4px);
}

.tree-visual {
    position: relative;
}

.tree-seed {
    width: 20px;
    height: 20px;
    background: var(--tree-1);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.tree-sprout {
    width: 30px;
    height: 40px;
    position: relative;
}

.tree-sprout::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: var(--tree-1);
    border-radius: 2px;
}

.tree-sprout::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 24px;
    background: var(--tree-2);
    border-radius: 50% 50% 50% 50%;
}

.tree-small {
    width: 40px;
    height: 60px;
    position: relative;
}

.tree-small::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 25px;
    background: #8B7355;
    border-radius: 2px;
}

.tree-small::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--tree-2);
    border-radius: 50%;
}

.tree-mature {
    width: 60px;
    height: 90px;
    position: relative;
}

.tree-mature::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 35px;
    background: #8B7355;
    border-radius: 3px;
}

.tree-mature::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--tree-3);
    border-radius: 50%;
}

.tree-full {
    width: 80px;
    height: 120px;
    position: relative;
}

.tree-full::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 45px;
    background: #8B7355;
    border-radius: 3px;
}

.tree-full::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background: var(--tree-4);
    border-radius: 50%;
}

.tree-cherry {
    width: 70px;
    height: 100px;
    position: relative;
}

.tree-cherry::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 30px;
    background: #6B5344;
    border-radius: 3px;
}

.tree-cherry::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFB7C5 0%, #FF8FA3 100%);
    border-radius: 50%;
}

.tree-info {
    margin-top: 8px;
    text-align: center;
}

.tree-info-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tree-info-date {
    font-size: 0.625rem;
    color: var(--text-secondary);
}

.achievements-section h3 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.achievement-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.achievement-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.achievement-icon.locked {
    background: rgba(45, 90, 74, 0.1);
    color: var(--text-secondary);
}

.achievement-icon.unlocked {
    background: linear-gradient(135deg, var(--accent), #F0C4A8);
    color: white;
    box-shadow: 0 4px 12px rgba(232, 168, 124, 0.3);
}

.achievement-icon i {
    width: 24px;
    height: 24px;
}

.achievement-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.achievement-item.locked .achievement-name {
    color: var(--text-secondary);
}

.achievement-desc {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

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

.stats-tabs {
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stat-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.stat-tab.active {
    background: var(--primary);
    color: white;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card.main {
    grid-column: span 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
}

.stat-card.main .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-card.main .stat-value {
    color: white;
}

.stat-card.main .stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: rgba(45, 90, 74, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: var(--primary);
}

.stat-icon i {
    width: 20px;
    height: 20px;
}

.stat-card .stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

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

.stat-trend {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.stat-trend.up {
    background: rgba(106, 175, 117, 0.15);
    color: var(--success);
}

.stat-trend.down {
    background: rgba(224, 123, 108, 0.15);
    color: var(--tomato);
}

.chart-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.chart-container h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding-top: 20px;
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bar {
    width: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: height 0.5s ease;
    min-height: 4px;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.stats-grid .chart-container {
    margin-bottom: 0;
}

.heatmap-preview {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.heatmap-preview:hover {
    box-shadow: var(--shadow-md);
}

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

.heatmap-preview-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.heatmap-expand-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    background: rgba(45, 90, 74, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.heatmap-expand-btn:hover {
    background: rgba(45, 90, 74, 0.15);
    color: var(--primary);
}

.heatmap-expand-btn i {
    width: 14px;
    height: 14px;
}

.heatmap-mini {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.heatmap-mini-row {
    display: contents;
}

.heatmap-mini-cell {
    aspect-ratio: 1;
    border-radius: 3px;
    background: rgba(45, 90, 74, 0.08);
    min-height: 20px;
}

.heatmap-mini-cell.level-1 { background: rgba(106, 175, 117, 0.3); }
.heatmap-mini-cell.level-2 { background: rgba(106, 175, 117, 0.5); }
.heatmap-mini-cell.level-3 { background: rgba(106, 175, 117, 0.7); }
.heatmap-mini-cell.level-4 { background: var(--success); }

.heatmap-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.heatmap-modal.show {
    opacity: 1;
    visibility: visible;
}

.heatmap-modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.heatmap-modal.show .heatmap-modal-content {
    transform: scale(1);
}

.heatmap-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.heatmap-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.heatmap-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(45, 90, 74, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.heatmap-modal-close:hover {
    background: rgba(45, 90, 74, 0.15);
    color: var(--primary);
}

.heatmap-modal-close i {
    width: 20px;
    height: 20px;
}

.heatmap-full {
    width: 100%;
}

.pie-chart {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 0;
}

.pie-container {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.pie-svg {
    width: 100%;
    height: 100%;
}

.pie-segment {
    transition: opacity 0.2s ease;
}

.pie-segment:hover {
    opacity: 0.8;
}

.pie-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
}

.pie-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.pie-legend-name {
    flex: 1;
    color: var(--text-primary);
}

.pie-legend-value {
    font-weight: 600;
    color: var(--text-secondary);
}

.pie-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.calendar-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

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

.calendar-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calendar-view-tabs {
    display: flex;
    background: rgba(45, 90, 74, 0.06);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.calendar-view-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.calendar-view-tab:hover {
    color: var(--text-primary);
}

.calendar-view-tab.active {
    background: var(--surface);
    color: var(--primary);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(45, 90, 74, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.calendar-nav-btn:hover:not(:disabled) {
    background: rgba(45, 90, 74, 0.15);
    color: var(--primary);
}

.calendar-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-nav-btn i {
    width: 18px;
    height: 18px;
}

.calendar-month {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 120px;
    text-align: center;
}

.calendar-grid {
    width: 100%;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-md);
    background: rgba(45, 90, 74, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 60px;
}

.calendar-cell:hover {
    background: rgba(45, 90, 74, 0.1);
    transform: scale(1.02);
}

.calendar-cell.empty {
    background: transparent;
    cursor: default;
}

.calendar-cell.empty:hover {
    transform: none;
}

.calendar-cell[data-today="true"] {
    box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-cell.level-1 { background: rgba(106, 175, 117, 0.15); }
.calendar-cell.level-2 { background: rgba(106, 175, 117, 0.3); }
.calendar-cell.level-3 { background: rgba(106, 175, 117, 0.5); }
.calendar-cell.level-4 { background: rgba(106, 175, 117, 0.7); }

.cell-day {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
}

.cell-time {
    font-size: 0.625rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.calendar-cell.names-mode {
    align-items: flex-start;
    justify-content: flex-start;
    background: rgba(45, 90, 74, 0.05) !important;
}

.calendar-cell.names-mode .cell-day {
    font-size: 0.7rem;
    position: absolute;
    top: 5px;
    left: 6px;
    opacity: 0.7;
}

.task-bars {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.task-bar {
    position: absolute;
    left: 0;
    right: 0;
    min-height: 4px;
}

.task-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 0 4px;
    margin-top: 18px;
    overflow: hidden;
    z-index: 1;
    position: relative;
}

.task-name-item {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.task-names .task-name-item:first-child {
    margin-top: 2px;
}

.task-name-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-name-text {
    font-size: 0.6rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.task-name-more {
    font-size: 0.55rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1px;
}

.calendar-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.calendar-modal.show {
    opacity: 1;
    visibility: visible;
}

.calendar-modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.calendar-modal.show .calendar-modal-content {
    transform: scale(1);
}

.calendar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.calendar-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.calendar-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(45, 90, 74, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.calendar-modal-close:hover {
    background: rgba(45, 90, 74, 0.15);
    color: var(--primary);
}

.calendar-modal-close i {
    width: 20px;
    height: 20px;
}

.cell-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.cell-detail-stat {
    text-align: center;
    padding: 16px;
    background: rgba(45, 90, 74, 0.05);
    border-radius: var(--radius-md);
}

.cell-detail-stat .stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.cell-detail-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cell-detail-tasks {
    margin-top: 16px;
}

.cell-detail-tasks h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.cell-task-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(45, 90, 74, 0.06);
}

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

.task-category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cell-task-item .task-name {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.cell-task-item .task-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cell-detail-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-secondary);
}

.settings-header {
    margin-bottom: 32px;
}

.settings-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.settings-section h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(45, 90, 74, 0.06);
}

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

.setting-item label {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.setting-input {
    width: 80px;
    padding: 10px 14px;
    border: 1px solid rgba(45, 90, 74, 0.15);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-align: center;
    transition: var(--transition);
}

.setting-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}

.toggle-btn {
    width: 52px;
    height: 28px;
    border: none;
    background: rgba(45, 90, 74, 0.15);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.toggle-btn.active {
    background: var(--primary);
}

.toggle-track {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.toggle-btn.active .toggle-thumb {
    transform: translateX(24px);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.auth-form .form-input {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 8px;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-info .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.user-info #userEmail {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-info #syncStatus {
    font-size: 0.875rem;
    color: var(--success);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(45, 90, 74, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(45, 90, 74, 0.15);
    color: var(--primary);
}

.modal-close i {
    width: 20px;
    height: 20px;
}

.modal-body {
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(45, 90, 74, 0.15);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 90, 74, 0.1);
}

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

.form-row .form-group {
    flex: 1;
}

.notification-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    transform: translateX(calc(100% + 50px));
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--accent);
}

.toast-content i {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.celebration-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.celebration-overlay.show {
    opacity: 1;
    visibility: visible;
}

.celebration-content {
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.celebration-overlay.show .celebration-content {
    transform: scale(1);
}

.celebration-tree {
    width: 120px;
    height: 160px;
    margin: 0 auto 24px;
}

.celebration-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

/* 成就解锁通知 - 右上角弹窗 */
.achievement-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(255,255,255,0.95) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255,255,255,0.1);
    z-index: 3000;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    overflow: hidden;
}

.achievement-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.achievement-notification.hide {
    transform: translateX(120%);
    opacity: 0;
}

.achievement-notif-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: achievementIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.achievement-notif-icon svg {
    width: 28px;
    height: 28px;
    stroke: white;
}

@keyframes achievementIconPop {
    0% { transform: scale(0) rotate(-20deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.achievement-notif-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.achievement-notif-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--warning);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.achievement-notif-name {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.achievement-notif-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--warning), #f59e0b, var(--warning));
    background-size: 200% 100%;
    animation: achievementGlow 2s linear infinite;
}

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

/* 成就解锁后的亮起效果 */
.achievement-item.just-unlocked {
    animation: achievementUnlockGlow 2s ease-out forwards;
}

@keyframes achievementUnlockGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
        transform: scale(1);
    }
    20% {
        box-shadow: 0 0 20px 8px rgba(245, 158, 11, 0.4);
        transform: scale(1.05);
    }
    40% {
        box-shadow: 0 0 10px 4px rgba(245, 158, 11, 0.3);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
        transform: scale(1);
    }
}

/* 成就列表中已解锁成就的光泽效果 */
.achievement-item.unlocked .achievement-icon.unlocked {
    background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 50%, #fbbf24 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.achievement-item.unlocked .achievement-icon.unlocked svg {
    stroke: white;
}

/* 成就通知粒子效果 */
.achievement-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 16px 8px;
    }

    .logo-text,
    .nav-item span {
        display: none;
    }

    .logo {
        justify-content: center;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .streak-display {
        flex-direction: column;
        padding: 12px 8px;
    }

    .streak-info {
        display: none;
    }

    .sidebar-achievements {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        max-width: calc(100% - 80px);
        padding: 24px;
    }

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

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding: 8px 16px;
        border-right: none;
        border-top: 1px solid rgba(45, 90, 74, 0.08);
    }

    .logo,
    .streak-display,
    .sidebar-achievements {
        display: none;
    }

    .nav-menu {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }

    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
    }

    .nav-item span {
        display: block;
        font-size: 0.625rem;
    }

    .nav-item.active::before {
        display: none;
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 16px;
        padding-bottom: 100px;
    }

    .timer-ring-container {
        width: 240px;
        height: 240px;
    }

    .timer-time {
        font-size: 2.5rem;
    }

    .mode-tabs {
        margin-bottom: 24px;
    }

    .mode-tab {
        padding: 8px 12px;
        font-size: 0.8125rem;
    }

    .task-input-container {
        flex-direction: column;
    }

    .task-tag-select,
    .task-priority-select {
        width: 100%;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .garden-stats {
        flex-direction: column;
        gap: 24px;
    }

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