:root {
    /* Color Palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --input-track: rgba(255, 255, 255, 0.3);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Spacing & Layout */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --border-radius: 16px;
    --max-width: 800px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--background-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: var(--spacing-md);
    overflow-x: hidden;
}

.app-container {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
}

/* Header */
header {
    text-align: center;
    padding: var(--spacing-lg) 0;
    animation: fadeInDown 0.8s ease-out;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.header-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.025em;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 50px;
    border: 1px solid var(--card-border);
}

.user-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Date Navigation */
.date-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    animation: fadeIn 0.8s ease-out;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.current-date {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Score Display */
.score-display {
    display: flex;
    justify-content: center;
    animation: fadeIn 1s ease-out;
}

.score-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease;
}

.score-card:hover {
    transform: scale(1.05);
}

.score-card h2 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.score-value {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-color);
}

/* KPI Inputs */
.kpi-inputs {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.kpi-inputs h3 {
    margin-bottom: var(--spacing-lg);
    font-size: 1.5rem;
    text-align: center;
}

.kpi-group {
    margin-bottom: var(--spacing-md);
}

.kpi-divider {
    height: 1px;
    background: var(--card-border);
    margin: var(--spacing-lg) 0;
}

.kpi-group label {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

/* Notes Section */
.notes-group {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.notes-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.notes-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: var(--spacing-md);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.notes-group textarea::placeholder {
    color: var(--text-secondary);
}

.notes-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* History View (Past Days) */
.history-view {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.history-view h3 {
    margin-bottom: var(--spacing-lg);
    font-size: 1.5rem;
    text-align: center;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--spacing-md);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.history-notes {
    margin-top: var(--spacing-md);
}

.history-notes label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.notes-display {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: var(--spacing-md);
    color: var(--text-secondary);
    font-style: italic;
    min-height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-entry-msg {
    text-align: center;
    color: var(--text-secondary);
    padding: var(--spacing-lg);
    font-style: italic;
}

/* Custom Range Input */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

/* Slider Track */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: var(--input-track);
    border-radius: 4px;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: var(--input-track);
    border-radius: 4px;
}

/* Slider Thumb */
input[type=range]::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
    transition: transform 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border: none;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
    transition: transform 0.2s;
}

input[type=range]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

/* Button */
.primary-btn {
    display: block;
    width: 100%;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: var(--spacing-lg);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.primary-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.primary-btn:active {
    transform: translateY(0);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Chart Section */
.chart-section {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.chart-section h3 {
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Auth Section */
.auth-section {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out;
}

.auth-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: var(--spacing-md);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
}

.auth-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.auth-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group label {
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: var(--spacing-md);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder {
    color: var(--text-secondary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    min-height: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Gratitude Section */
.gratitude-group {
    margin-bottom: var(--spacing-md);
}

.gratitude-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.gratitude-header label {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--secondary-color);
}

.reroll-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.3s;
    padding: 0;
    line-height: 1;
}

.reroll-btn:hover {
    transform: rotate(180deg);
}

.gratitude-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: var(--spacing-md);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    resize: none;
    min-height: 60px;
    transition: all 0.3s;
}

.gratitude-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

/* Radar Chart */
.radar-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.radar-toggle .small {
    font-size: 0.75rem;
    padding: 4px 12px;
}

#radar-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Coaching Panel */
.coaching-panel {
    max-width: 500px;
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

.coaching-header {
    margin-bottom: 1.5rem;
}

.coaching-tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.coaching-panel h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.coaching-body {
    margin-bottom: 2rem;
}

.coaching-body p {
    line-height: 1.7;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.coaching-footer {
    display: flex;
    justify-content: center;
}

.coaching-footer .primary-btn {
    margin-top: 0;
    width: auto;
    padding: 0.75rem 2.5rem;
}

/* Identity Options */
.identity-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.identity-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.identity-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.identity-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.identity-item span {
    font-size: 0.95rem;
}

/* History Gratitude */
.history-gratitude {
    margin-top: var(--spacing-md);
}

.history-gratitude label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--secondary-color);
}

/* Zen Mode Overlay */
.zen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.zen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.zen-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.zen-close:hover {
    opacity: 1;
}

.breathing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

/* Breathing Pattern Selector */
.breathing-pattern-selector {
    margin-bottom: -1rem;
}

.breathing-pattern-selector select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1.5rem 0.5rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    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='rgba(255,255,255,0.6)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    transition: all 0.3s ease;
}

.breathing-pattern-selector select:hover,
.breathing-pattern-selector select:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.12);
}

.breathing-pattern-selector select option {
    background: #1a1a2e;
    color: white;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    box-shadow: 0 0 50px var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 4s ease-in-out;
}

.breathing-circle-inner {
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: white;
    opacity: 0.2;
}

.breathing-text {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.1em;
}

/* Affirmation Text Overlay */
.affirmation-text {
    font-size: 1.3rem;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    max-width: 500px;
    min-height: 2rem;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.affirmation-text.visible {
    opacity: 1;
}

/* Affirmation Management List */
.affirmation-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.affirmation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    transition: all 0.2s;
}

.affirmation-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.affirmation-item span {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-color);
}

.affirmation-item .delete-affirmation-btn {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.affirmation-item .delete-affirmation-btn:hover {
    opacity: 1;
}

/* Routine Checklist */
.routine-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.routine-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.routine-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.routine-item.completed {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success-color);
}

.routine-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--success-color);
}

/* Routine Management Modal */
.routine-management-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.routine-mgmt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

height: 2.5rem;
text-align: center;
}

/* End Meditation Button */
.zen-end-btn {
    margin-top: 2rem;
    padding: 0.75rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zen-end-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.zen-timer {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-top: 2rem;
    font-family: monospace;
}

/* Breathing Animations */
@keyframes breatheIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.8);
    }
}

@keyframes breatheOut {
    from {
        transform: scale(1.8);
    }

    to {
        transform: scale(1);
    }
}

.breathing-circle.inhale {
    animation: breatheIn 4s forwards ease-in-out;
}

.breathing-circle.exhale {
    animation: breatheOut 8s forwards ease-in-out;
}

.breathing-circle.hold {
    /* No scale change during hold */
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (min-width: 768px) {
    .app-container {
        padding: var(--spacing-lg);
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .header-title {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .header-title h1 {
        font-size: 1.8rem;
    }

    .score-card {
        width: 160px;
        height: 160px;
    }

    .score-value {
        font-size: 3rem;
    }

    .history-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-btn span {
        display: none;
    }
}

/* Community Garden */
#community-garden {
    margin-top: 2rem;
}

.garden-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.bloom-status {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.garden-container {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
}

/* Social Resilience */
.squad-member {
    transition: transform 0.3s;
}

.squad-member:hover {
    transform: translateY(-5px);
}

.mood-art-container:hover {
    transform: scale(1.02);
}

/* Animations */
#micro-reflection-container {
    animation: fadeIn 0.5s ease;
    transition: all 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Polish */
@media (max-width: 480px) {
    .squad-list {
        padding-bottom: 0.5rem;
    }

    .mood-art-container {
        height: 120px;
    }
}

/* CBT Quiz Styles */
#cbt-section {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 80px;
    animation: fadeIn 0.5s ease-out;
}

#cbt-section header {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    margin-bottom: 30px;
    text-align: center;
}

#cbt-section h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.cbt-quiz-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cbt-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cbt-question-number {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 700;
}

.cbt-scenario-text {
    background: rgba(99, 102, 241, 0.1);
    padding: 16px;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
    font-style: italic;
    color: var(--text-color);
}

.cbt-question-text {
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.cbt-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cbt-option-btn {
    text-align: left;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    /* Darker for app theme */
    border: 2px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    color: var(--text-color);
    position: relative;
    font-family: 'Inter', sans-serif;
}

.cbt-option-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.cbt-option-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.cbt-option-btn.correct {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.cbt-option-btn.incorrect {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Add icons for correct/incorrect */
.cbt-option-btn.correct::after {
    content: "✓";
    position: absolute;
    right: 15px;
    font-weight: bold;
}

.cbt-option-btn.incorrect::after {
    content: "✕";
    position: absolute;
    right: 15px;
    font-weight: bold;
}

.cbt-feedback {
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.cbt-feedback.show {
    display: block;
}

.cbt-feedback.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success-color);
    color: #a7f3d0;
}

.cbt-feedback.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--error-color);
    color: #fca5a5;
}

.cbt-section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 40px 0 20px 0;
    color: var(--text-secondary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85em;
}

.cbt-section-divider::before,
.cbt-section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--card-border);
}

.cbt-section-divider::before {
    margin-right: .5em;
}

.cbt-section-divider::after {
    margin-left: .5em;
}

.cbt-hint-container {
    margin-top: 12px;
}

.cbt-hint-toggle {
    font-size: 0.9em;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: underline;
    display: inline-block;
}

.cbt-hint-content {
    display: none;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-size: 0.9em;
}

#score-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0f172a;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: bold;
    z-index: 100;
    display: none;
    /* Controlled by JS via class/style or separate handling */
    align-items: center;
    gap: 10px;
}

/* Ensure it shows when class is managed correctly */
#score-panel.visible {
    display: flex;
}

#cbt-progress-bar {
    height: 4px;
    background: #334155;
    width: 100px;
    border-radius: 2px;
    overflow: hidden;
}

#cbt-progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 0.3s ease;
}