:root {
    /* MindCare Clinical Healthcare Palette */
    --lavender: #64748b;
    --periwinkle: #0F766E;
    --sky-blue: #0F766E;
    --bg-blue: #f8fafc;
    --pale-lavender: #ffffff;

    /* Accent Colors */
    --blush: #dc2626;
    --peach: #B45309;
    --golden: #f59e0b;

    /* Neutrals */
    --white: #ffffff;
    --cool-gray: #e2e8f0;
    --slate: #0f172a;

    /* Surfaces & Gradients */
    --grad-lavender-sky: none;
    --grad-peach-lavender: none;
    --grad-sidebar: #ffffff;

    /* Shadows */
    --soft-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06);
    
    /* Standard Radii */
    --radius-main: 10px;
    --radius-round: 10px;

    /* Transitions */
    --transition-speed: 0.2s;
}

/* Dark Mode Support */
body.dark-mode {
    --bg-blue: #0f172a;
    --white: #1e293b;
    --slate: #f8fafc;
    --cool-gray: #334155;
    --pale-lavender: #1e293b;
    --grad-sidebar: #1e293b;
    --soft-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --mission-primary: #0F766E;
    --mission-bg: #0f172a;
    --mission-card-bg: #1e293b;
    --mission-border: #334155;
    --mission-text: #f8fafc;
    --mission-text-muted: #94a3b8;
}

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

html {
    background-color: #f8fafc;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-blue);
    color: var(--slate);
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Transition Overlay */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fafafa;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.content-fading {
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

/* Mood Option Selected State */
.mood-option {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 15px;
    border-radius: 20px;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mood-option:hover {
    background: rgba(143, 132, 216, 0.05);
}

.mood-option.selected {
    background: var(--white);
    border-color: var(--periwinkle);
    box-shadow: var(--soft-shadow);
    transform: scale(1.1);
}

.mood-option.selected i {
    color: var(--periwinkle);
}

.mood-option i {
    font-size: 32px;
    transition: color 0.3s;
}


.container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Security: Hide navigation for "logged out" states on public pages */
.sidebar, 
.bottom-nav, 
.aiWidget {
    display: none !important;
}

/* Reveal only when the body is flagged as logged-in */
body.user-logged-in .sidebar, 
body.user-logged-in .bottom-nav,
body.user-logged-in .aiWidget {
    display: flex !important;
}

/* Hide Navigation elements on inappropriate screens */
.mobile-top-bar { display: none !important; }

/* Bottom nav visibility managed by navigationV2.css and user-logged-in class */

@media (max-width: 900px) {
    body.user-logged-in .mobile-top-bar {
        display: flex !important;
    }

    .mobile-top-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: var(--white);
        display: none; /* overrides top level only when not logged in */
        align-items: center;
        padding: 0 20px;
        border-bottom: 1px solid var(--cool-gray);
        z-index: 900;
        justify-content: flex-start; /* changed from space-between */
    }

    .mobile-logo {
        display: none !important;
    }

    .menu-toggle-btn {
        background: none;
        border: none;
        font-size: 1.4rem;
        color: var(--slate);
        cursor: pointer;
    }
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--grad-sidebar);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05); /* Softer shadow */
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000; /* High z-index for drawer */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.collapsed {
    width: 80px;
}

.toggle-btn {
    position: absolute;
    top: 30px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: var(--white);
    border: 1px solid var(--cool-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--slate);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    z-index: 30;
    opacity: 0;
    /* Hidden by default, shown on hover of sidebar usually or valid layout */
}

.sidebar:hover .toggle-btn {
    opacity: 1;
    right: 10px;
}

/* For this design, let's keep the toggle button visible inside or near logo */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    /* Reduced margin */
    padding: 0 5px;
    /* Better horizontal spacing */
    height: 50px;
    /* Force height alignment */
}

.sidebar-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--slate);
    font-size: 20px;
    cursor: pointer;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 600;
    color: var(--periwinkle);
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s;
}

.sidebar.collapsed .logo span {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.sidebar.collapsed .logo {
    justify-content: center;
    padding-left: 0;
    width: 100%;
}

.collapse-btn {
    background: rgba(143, 132, 216, 0.1);
    border: 1px solid rgba(143, 132, 216, 0.2);
    color: var(--periwinkle);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.collapse-btn:hover {
    background: rgba(143, 132, 216, 0.2);
    color: var(--periwinkle);
}

.sidebar.collapsed .collapse-btn {
    position: absolute;
    top: 35px;
    left: 50%;
    transform: translateX(-50%);
}

.sidebar.collapsed .collapse-btn:hover {
    transform: translateX(-50%) scale(1.05);
}

/* Adjust nav items for collapse */
nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

nav li a {
    text-decoration: none;
    color: var(--slate);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 15px;
    border-radius: 16px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sidebar.collapsed nav li a {
    justify-content: center;
    padding: 14px;
}

.sidebar.collapsed nav li a span {
    display: none;
}

/* Active state with periwinkle glow */
nav li.active a,
nav li a:hover {
    background-color: rgba(143, 132, 216, 0.2);
    /* Slightly darker bg for better contrast */
    color: #4B0082;
    /* Deep Indigo for clear visibility */
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(184, 185, 230, 0.3);
}

nav li.emergency {
    margin-top: auto;
}

nav li.emergency a {
    color: var(--blush);
}

nav li.emergency a:hover {
    background-color: rgba(242, 166, 194, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    min-width: 0; /* Critical for grid layouts */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    scroll-behavior: smooth;
    background-color: var(--bg-blue);
    /* Multi-layered background removed for cleaner look or kept subtle */
    background-attachment: fixed;
}

/* Content Wrapper to restrict max width and center */
.main-content>* {
    width: 100%;
    max-width: 1100px;
    flex-shrink: 0;
    /* Prevent squishing */
}

/* Header */

.dashboard-header-modern {
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4)), var(--accent-lavender);
    border-radius: 40px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 25px 60px rgba(143, 132, 216, 0.25);
    background-attachment: fixed; /* Parallax feel */
}

@media (max-width: 1200px) {
    .dashboard-header-modern {
        min-height: 350px;
    }
}

.header-content-v2 {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 40px;
    max-width: 800px;
}

.header-content-v2 h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -1px;
    color: #ffffff;
}

.header-content-v2 p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-actions-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.level-badge-modern,
.streak-badge-modern {
    background: #ffffff; /* Solid White */
    border: 1px solid #dbdbdb;
    padding: 15px 25px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: var(--slate); /* Fix visibility: Ensure text is dark on white background */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.level-badge-modern:hover,
.streak-badge-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.badge-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
}

.badge-inner i {
    color: #ffd700;
}

.label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    opacity: 1; /* Ensure full visibility */
    margin-bottom: 5px;
    color: var(--ig-text-secondary);
}

.gate-warning {
    background: #ffffff; /* Solid White */
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 32px;
    display: flex;
    flex-direction: row; /* Horizontal layout */
    align-items: center;
    gap: 25px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    animation: fadeInModal 1s 1s both;
}

.lock-icon-wrapper {
    width: 60px;
    height: 60px;
    background: #4F46E5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.warning-text {
    text-align: left;
    flex: 1;
}

.warning-text h3 {
    margin: 0 0 5px;
    font-size: 1.25rem;
    font-weight: 700;
}

.warning-text p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.unlock-btn {
    background: white;
    color: #4F46E5;
    border: none;
    padding: 14px 24px;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.unlock-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gated-content {
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0; /* Fully hidden until check-in */
    pointer-events: none;
    user-select: none;
    transform: translateY(20px); /* Add a slide-up effect when unlocking */
}

.gated-content.unlocked {
    filter: none;
    pointer-events: all;
    opacity: 1;
    user-select: auto;
    transform: translateY(0);
}

.gated-content.unlocked::after {
    display: none;
}

/* Hero Animations */
.dashboard-header-modern .header-content-v2 {
    animation: slideUpFade 1s both;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-actions-row>div {
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.hero-actions-row>div:nth-child(1) {
    animation-delay: 0.4s;
}

.hero-actions-row>div:nth-child(2) {
    animation-delay: 0.6s;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gate-warning {
    animation: fadeInModal 1s 1s both;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Subtle texture/shapes for header */
.top-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    /* No blur as per user request */
}

.greeting-container h1 {
    font-size: 36px;
    font-weight: 600;
    margin-bottom: 12px;
}

.greeting-container .subtext {
    opacity: 0.95;
    font-size: 18px;
}

.header-mood-summary {
    background: #ffffff;
    padding: 10px 24px;
    border-radius: var(--radius-main);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin-top: 20px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-main);
    padding: 24px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--hover-shadow);
}

.card h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--slate);
    margin-bottom: 20px;
}

/* Mood Card */
.mood-card .mood-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 20px;
    font-weight: 600;
    color: var(--golden);
}

.big-icon {
    font-size: 48px;
}

/* Stress Card */
.progress-bar-container {
    background: var(--cool-gray);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    background: var(--blush);
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease;
}

.status-text {
    font-size: 14px;
    color: var(--slate);
    text-align: right;
}

/* Actions Card */
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-buttons button {
    flex: 1;
    background: rgba(246, 193, 161, 0.2);
    /* Peach tint */
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--slate);
    /* Darker text for contrast */
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.action-buttons button i {
    font-size: 20px;
    color: var(--peach);
}

.action-buttons button:hover {
    background: rgba(246, 193, 161, 0.4);
}

.encouragement-card {
    background: var(--white);
    border: 2px solid var(--lavender);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.encouragement-card p {
    font-size: 20px;
    font-style: italic;
    color: var(--periwinkle);
    line-height: 1.4;
    text-align: center;
}

/* Bottom Section */
.bottom-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.bottom-section>div {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--soft-shadow);
}

.insight-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.insight-summary p {
    font-size: 16px;
    color: var(--slate);
    line-height: 1.5;
}

/* AI Widget */
/* AI Widget styles moved to chat-widget.css */

/* Card Layout Fixes */
.progress-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.progress-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ai-body {
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    .bottom-section {
        grid-template-columns: 1fr;
    }

    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }

    .sidebar span {
        display: none;
    }

    .logo {
        justify-content: center;
        padding: 0;
    }

    nav li a {
        justify-content: center;
        padding: 14px;
    }

    .main-content {
        padding: 20px;
    }
}

/* Emergency Page Styling */
.emergency-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5253 100%) !important;
}

.emergency-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
}

.emergency-section h3 {
    margin-bottom: 20px;
    font-size: 22px;
    color: var(--slate);
}

.sos-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-main);
    box-shadow: 0 10px 30px rgba(238, 82, 83, 0.15);
    text-align: center;
    border: 2px solid rgba(238, 82, 83, 0.1);
}

.sos-card i {
    font-size: 48px;
    color: #ee5253;
    margin-bottom: 20px;
}

.sos-card h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--slate);
}

.sos-btn {
    display: inline-block;
    margin-top: 25px;
    background: #ee5253;
    color: white;
    padding: 16px 40px;
    border-radius: var(--radius-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(238, 82, 83, 0.3);
    transition: all 0.3s;
}

.sos-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(238, 82, 83, 0.4);
}

.alert-box {
    background: #fff5f5;
    border-left: 5px solid #ee5253;
    padding: 20px 25px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.alert-box i {
    color: #ee5253;
    font-size: 20px;
    margin-top: 3px;
}

.alert-box p {
    color: #555;
    line-height: 1.6;
    font-size: 15px;
}

.helpline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.helpline-card {
    background: var(--white);
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
}

.helpline-info h4 {
    font-size: 18px;
    color: var(--slate);
    margin-bottom: 5px;
}

.helpline-info p {
    font-size: 14px;
    color: #888;
}

@media (max-width: 600px) {
    .container {
        flex-direction: column;
    }

    .main-content {
        padding: 20px;
        width: 100%;
    }

}

/* Mood Selection Horizontal Alignment */
.mood-selection {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    width: 100%;
}

.mood-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: var(--radius-main);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mood-option:hover {
    background: rgba(143, 132, 216, 0.05);
}

/* Centering overrides for specific pages */
.checkin-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.checkin-section {
    width: 100%;
    max-width: 700px;
    /* Slightly wider for horizontal layout */
    margin-bottom: 50px;
    /* Better spacing between sections */
}

/* Redesigned Journal Area - "Cool Typing Place" */
#journalEntry {
    width: 100%;
    min-height: 180px;
    padding: 24px;
    border-radius: 24px;
    border: 2px solid var(--cool-gray);
    background: #ffffff;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.6;
    color: var(--slate);
    resize: vertical;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
}

#journalEntry:focus {
    border-color: var(--lavender);
    background: var(--white);
    box-shadow: 0 4px 20px rgba(184, 185, 230, 0.25);
    transform: translateY(-2px);
}

/* Spacing for Quick Metrics */
.sliders-grid {
    display: grid;
    gap: 30px;
    margin-top: 20px;
}

.slider-group {
    background: var(--white);
    padding: 20px 24px;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
}

.slider-group label {
    display: block;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--slate);
}

/* Resources Hub Styling */
.resources-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.search-bar-card {
    background: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-main);
    box-shadow: var(--soft-shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(184, 185, 230, 0.2);
    transition: all 0.3s ease;
}

.search-bar-card:focus-within {
    box-shadow: 0 8px 25px rgba(143, 132, 216, 0.15);
    border-color: var(--lavender);
}

.search-bar-card input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 5px;
    font-size: 16px;
    font-family: inherit;
    color: var(--slate);
    background: transparent;
}

.search-bar-card button {
    background: var(--grad-lavender-sky);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(143, 132, 216, 0.3);
}

.search-bar-card button:hover {
    box-shadow: 0 6px 15px rgba(143, 132, 216, 0.4);
}

.resource-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 35px;
    justify-content: center;
}

.cat-btn {
    background: var(--white);
    border: 1px solid var(--lavender);
    color: var(--periwinkle);
    padding: 10px 24px;
    border-radius: var(--radius-main);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.cat-btn:hover {
    background: var(--bg-blue);
}

.cat-btn.active {
    background: var(--grad-lavender-sky);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(143, 132, 216, 0.3);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.resource-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(184, 185, 230, 0.1);
    padding: 0;
    /* Override previous padding if any */
}

.resource-card:hover {
    box-shadow: 0 15px 45px rgba(143, 132, 216, 0.2);
}

.resource-img {
    height: 160px;
    background: var(--bg-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: var(--periwinkle);
    transition: transform 0.3s ease;
}



.resource-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.resource-card .badge {
    background: rgba(143, 132, 216, 0.1);
    color: var(--periwinkle);
    padding: 4px 12px;
    border-radius: var(--radius-main);
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.resource-card h3 {
    font-size: 20px;
    color: var(--slate);
    margin: 0;
}

.resource-card p {
    font-size: 15px;
    color: var(--slate);
    opacity: 0.8;
    line-height: 1.6;
    margin: 0;
}

.resource-links {
    margin-top: 10px;
}

.res-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--grad-lavender-sky);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.res-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(143, 132, 216, 0.3);
}

.resource-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.settings-group h3 {
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card {
    background: var(--white);
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-item label {
    font-size: 14px;
    font-weight: 500;
}

.setting-item input,
.setting-item select {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--cool-gray);
    font-family: inherit;
}

.setting-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Switch Styling */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider.round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--cool-gray);
    transition: .4s;
    border-radius: 34px;
}

.slider.round:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--periwinkle);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.settings-action-btn {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--lavender);
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.settings-action-btn:hover {
    background: var(--bg-blue);
}

.settings-action-btn.delete {
    border-color: var(--blush);
    color: var(--blush);
}

.settings-action-btn.delete:hover {
    background: rgba(242, 166, 194, 0.1);
}

.submit-btn {
    background: var(--grad-lavender-sky);
    color: var(--white);
    border: none;
    padding: 18px 45px;
    border-radius: var(--radius-main);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--soft-shadow);
    transition: all 0.3s ease;
    margin-top: 20px;
    align-self: center;
    /* Ensure it stays centered in the flex container */
}

.submit-btn:hover {
    box-shadow: var(--hover-shadow);
}

.icon-youtube {
    color: #FF0000;
}

.chart-stop-top {
    stop-opacity: 0.2;
    stop-color: var(--periwinkle);
}

.chart-stop-bottom {
    stop-color: var(--white);
    stop-opacity: 0;
}

.history-journal {
    font-size: 14px;
    color: var(--slate);
    margin-top: 5px;
    font-style: italic;
    opacity: 0.8;
}

.game-preview.sage {
    background: #b2d8b2;
    color: #4a6d4a;
}

.game-preview.gold {
    background: #ffe0b2;
    color: #f57c00;
}

.game-preview.blue {
    background: #bbdefb;
    color: #1976d2;
}

.game-preview.rose {
    background: #f8bbd0;
    color: #c2185b;
}

/* Shared Grid Layout for Games & Tools */
.games-grid,
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.game-card,
.tool-card {
    background: var(--white);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(184, 185, 230, 0.1);
}

.game-card:hover,
.tool-card:hover {
    box-shadow: 0 15px 45px rgba(143, 132, 216, 0.25);
}

.game-preview,
.tool-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    transition: transform 0.3s ease;
}

.game-info,
.tool-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.game-info h3,
.tool-info h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--slate);
}

.game-info p,
.tool-info p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--slate);
    opacity: 0.8;
    margin-bottom: 24px;
    flex-grow: 1;
}

.game-btn,
.tool-btn {
    background: var(--grad-lavender-sky);
    color: var(--white);
    border: none;
    padding: 14px 28px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.game-btn:hover,
.tool-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(143, 132, 216, 0.3);
}

/* Colors for Tool previews (same as games) */
.tool-preview.sage {
    background: #b2d8b2;
    color: #4a6d4a;
}

.tool-preview.gold {
    background: #ffe0b2;
    color: #f57c00;
}

.tool-preview.blue {
    background: #bbdefb;
    color: #1976d2;
}

.tool-preview.rose {
    background: #f8bbd0;
    color: #c2185b;
}

.game-card:hover {
    box-shadow: 0 15px 45px rgba(143, 132, 216, 0.25);
}

.game-preview {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    transition: transform 0.3s ease;
}

.game-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.game-info h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--slate);
}

.game-info p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--slate);
    opacity: 0.8;
    margin-bottom: 24px;
    flex-grow: 1;
}

.game-btn {
    background: var(--grad-lavender-sky);
    color: var(--white);
    border: none;
    padding: 14px 28px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.game-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 15px rgba(143, 132, 216, 0.3);
}

/* Interactive Game Components */
.breathing-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 30px;
}

.breathing-circle {
    width: 150px;
    height: 150px;
    background: var(--grad-lavender-sky);
    border-radius: 50%;
    transition: transform 4s ease-in-out;
    box-shadow: 0 0 50px rgba(184, 185, 230, 0.4);
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 20px;
}

.memory-card {
    background: var(--bg-blue);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
}

.memory-card.flipped {
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.memory-card.matched {
    background: var(--periwinkle);
    color: var(--white);
    cursor: default;
}

.zen-pop canvas {
    background: #fdfdfd;
    border-radius: 20px;
    cursor: crosshair;
}

/* Game Overlay */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.game-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.game-screen {
    width: 90%;
    max-width: 800px;
    height: 80%;
    background: var(--white);
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(143, 132, 216, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.game-header {
    padding: 24px 40px;
    background: var(--bg-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-game {
    background: var(--cool-gray);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    transition: all 0.3s;
}

.close-game:hover {
    background: var(--blush);
    color: var(--white);
    transform: rotate(90deg);
}

/* Dynamic Analytics Chart */
#moodChartPath {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawChart 2s ease-out forwards;
}

@keyframes drawChart {
    to {
        stroke-dashoffset: 0;
    }
}

.chart-area {
    fill: url(#chartGradient);
    opacity: 0.4;
    transition: d 0.5s ease;
}

/* Empty State for Chart */
.chart-container.empty::after {
    content: 'Start your journey with a daily check-in to see your trends! ✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: var(--slate);
    opacity: 0.7;
    text-align: center;
    width: 80%;
}

/* Zen Flow Game */
.zen-flow {
    position: relative;
    width: 100%;
    background: #fdfdfd;
    border-radius: 20px;
    overflow: hidden;
    cursor: crosshair;
}

#flowCanvas {
    display: block;
    width: 100%;
}

.flow-controls {
    padding: 15px;
    background: #ffffff;
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
}

/* Milestones */
.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.milestone-item {
    background: #f8f9fc;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
    transition: all 0.3s;
}

.milestone-item.achieved {
    opacity: 1;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    color: var(--periwinkle);
}

.milestone-item i {
    font-size: 32px;
}

.milestone-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Memory Game Upgrade */
.memory-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.level-select {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.memory-grid {
    display: grid;
    gap: 15px;
    max-width: 500px;
    width: 100%;
}

.memory-card {
    aspect-ratio: 1;
    background: #f8f9fc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    position: relative;
    border: 2px solid transparent;
}

.memory-card .front,
.memory-card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.memory-card .back {
    background: var(--white);
    transform: rotateY(180deg);
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    background: rgba(143, 132, 216, 0.1);
    border-color: var(--periwinkle);
    cursor: default;
}

/* AI Suggestion Chip */
.ai-suggest-chip {
    background: var(--periwinkle);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 4px 10px rgba(143, 132, 216, 0.2);
}

.ai-suggest-chip:hover {
    background: var(--slate);
    box-shadow: 0 6px 15px rgba(143, 132, 216, 0.3);
}

/* Full-Page Game Container */
.game-container-full {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-blue);
    border-radius: 32px;
    margin-top: 20px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
    min-height: 600px;
}

/* Chess Board Styling */
.chess-board-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.chess-board {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    border: 8px solid var(--slate);
    border-radius: 8px;
    box-shadow: var(--hover-shadow);
}

.chess-square {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s;
}

.chess-square.light {
    background-color: #f0d9b5;
}

.chess-square.dark {
    background-color: #b58863;
}

.chess-square.selected {
    background-color: #7b61ff !important;
    color: white;
}

.chess-square:hover {
    filter: brightness(1.1);
}

.chess-square i.white {
    color: #fff;
    text-shadow: 0 0 3px #000;
}

.chess-square i.black {
    color: #000;
}

.chess-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: var(--white);
    padding: 20px 40px;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s;
}

.player-info.active {
    background: var(--bg-blue);
    border: 2px solid var(--lavender);
    transform: scale(1.05);
}

.chess-status {
    font-weight: 600;
    color: var(--slate);
    font-size: 18px;
}

@media (max-width: 600px) {
    .chess-board {
        grid-template-columns: repeat(8, 40px);
        grid-template-rows: repeat(8, 40px);
    }

    .chess-square {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Expression Game */
.canvas-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--soft-shadow);
    padding: 20px;
    width: 100%;
    max-width: 800px;
}

#expressionCanvas {
    width: 100%;
    height: 400px;
    cursor: crosshair;
    touch-action: none;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}

.expression-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Story Game */
.story-card {
    max-width: 600px;
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
}

.story-image {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 20px;
    height: 300px;
    object-fit: cover;
}

.story-text {
    margin: 15px 0;
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--slate);
}

.story-choices {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Habits Game */
.habits-garden {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 600px;
}

.habit-plant {
    background: white;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--soft-shadow);
    border: 2px solid transparent;
    overflow: hidden;
    /* Correct edges */
}

.habit-plant:hover {
    /* transform: translateY(-5px); Removed */
    box-shadow: var(--hover-shadow);
    border-color: var(--lavender);
}

.habit-icon {
    font-size: 40px;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.habit-progress-bg {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
}

.habit-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Community & Social Improvements */
.community-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
    width: 100%;
}

.tab-btn {
    padding: 12px 28px;
    border-radius: var(--radius-main);
    border: 1px solid var(--lavender);
    background: var(--white);
    color: var(--periwinkle);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.tab-btn:hover {
    background: var(--bg-blue);
    box-shadow: 0 6px 15px rgba(143, 132, 216, 0.1);
}

.tab-btn.active {
    background: var(--grad-lavender-sky);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(143, 132, 216, 0.3);
}

.tab-btn i {
    font-size: 18px;
}

.community-view {
    display: none;
    width: 100%;
}

.community-view.active {
    display: block;
}

.create-post-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--soft-shadow);
    margin-bottom: 25px;
}

.post-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.post-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

#postInput {
    flex: 1;
    border: none;
    background: #f8f9fc;
    padding: 12px 20px;
    border-radius: 25px;
    outline: none;
}

.social-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-card {
    background: var(--white);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--soft-shadow);
}

.chat-app-layout {
    display: flex;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    height: 550px;
    box-shadow: var(--soft-shadow);
}

.chat-sidebar {
    width: 260px;
    border-right: 1px solid #f0f2f8;
    display: flex;
    flex-direction: column;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-item.active {
    background: rgba(143, 132, 216, 0.1);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fdfdfd;
}

.chat-messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
}

.chat-bubble.sent {
    align-self: flex-end;
    background: var(--periwinkle);
    color: var(--white);
}

.chat-bubble.received {
    align-self: flex-start;
    background: #f0f2f8;
}

.chat-input-row {
    padding: 15px;
    background: var(--white);
    display: flex;
    gap: 10px;
    border-top: 1px solid #f0f2f8;
}

.chat-input-row input {
    flex: 1;
    border: 1px solid var(--cool-gray);
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(107, 111, 141, 0.8);
    /* Solid dark overlay */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    padding: 30px;
    border-radius: 28px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(143, 132, 216, 0.2);
    transform: translateY(20px);
    max-height: 90vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h2 {
    font-size: 24px;
    color: var(--periwinkle);
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--slate);
    cursor: pointer;
}

.mood-selector h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.mood-grid .mood-option {
    padding: 10px;
    border-radius: 16px;
    background: #f8f9fc;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mood-grid .mood-option i {
    font-size: 24px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.slider-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.slider-item label {
    font-weight: 500;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--slate);
    opacity: 0.8;
}

/* Custom Slider Styling */
.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--cool-gray);
    outline: none;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--periwinkle);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(143, 132, 216, 0.4);
    border: 3px solid var(--white);
    transition: transform 0.2s;
}

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

.journal-input textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border-radius: 16px;
    border: 2px solid var(--cool-gray);
    background: #f8f9fc;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    resize: none;
    margin-top: 10px;
    margin-bottom: 20px;
}

.journal-input textarea:focus {
    border-color: var(--periwinkle);
}

.submit-btn {
    width: 100%;
    background: var(--grad-lavender-sky);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: var(--radius-main);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(143, 132, 216, 0.3);
    transition: all 0.3s;
}

.submit-btn:hover {
    box-shadow: 0 6px 20px rgba(143, 132, 216, 0.4);
}

/* Chart Area Gradient Fill */
.chart-area {
    fill: url(#chartGradient);
}

#moodChartPath {
    filter: drop-shadow(0 4px 6px rgba(143, 132, 216, 0.2));
    transition: d 0.5s ease;
}

/* Fix for Tools and Games Grid */
.tools-grid,
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.history-container {
    margin-top: 20px;
}

.history-card.full-history {
    max-width: 100%;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.history-filters input {
    padding: 10px 20px;
    border-radius: var(--radius-main);
    border: 1px solid var(--cool-gray);
    outline: none;
    width: 250px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.history-filters input:focus {
    border-color: var(--periwinkle);
}

.activity-list.detailed {
    display: flex;
    flex-direction: column;
    gap: 15px;
    list-style: none;
}

.history-item-card {
    background: #f8f9fc;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.history-item-card:hover {
    background: var(--white);
    border-color: var(--lavender);
    box-shadow: var(--soft-shadow);
}

.history-item-main {
    display: flex;
    gap: 20px;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.history-date {
    font-size: 0.85rem;
    color: var(--slate);
    opacity: 0.7;
}

.history-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.history-stats span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--periwinkle);
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-journal-entry {
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--slate);
    padding-top: 10px;
    border-top: 1px dashed var(--cool-gray);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--slate);
    opacity: 0.6;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.post-card {
    transition: transform 0.2s;
    border: 1px solid #f0f2f5;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.post-meta h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--slate);
}

.post-time {
    font-size: 0.8rem;
    color: var(--slate);
    opacity: 0.6;
}

.post-content {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: var(--slate);
}

.post-footer {
    display: flex;
    border-top: 1px solid #f0f2f5;
    padding-top: 10px;
    gap: 10px;
}

.post-footer-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: var(--slate);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.post-footer-btn:hover {
    background: #f0f2f5;
}

.post-footer-btn.liked {
    color: #e74c3c;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
    padding-bottom: 20px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--cool-gray);
    background: var(--white);
    color: var(--slate);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.page-btn.active,
.page-btn:hover:not(:disabled) {
    background: var(--periwinkle);
    color: var(--white);
    border-color: var(--periwinkle);
}

.community-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: var(--white);
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Correct edges */
}

.action-card:hover {
    /* transform: translateY(-4px); Removed */
    box-shadow: var(--hover-shadow);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--pale-lavender);
    color: var(--periwinkle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.action-content {
    flex: 1;
}

.action-content strong {
    display: block;
    font-size: 18px;
    color: var(--slate);
    margin-bottom: 5px;
}

.action-content p {
    font-size: 14px;
    color: var(--slate);
    opacity: 0.8;
    margin: 0;
}

.action-arrow {
    font-size: 20px;
    color: var(--slate);
    opacity: 0.4;
    transition: all 0.3s;
}

.action-card:hover .action-arrow {
    opacity: 1;
    transform: translateX(5px);
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.group-card {
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.3s;
    overflow: hidden;
    /* Correct edges */
}

.group-card:hover {
    /* transform: translateY(-5px); Removed */
    box-shadow: var(--hover-shadow);
    border-color: var(--lavender);
}

.group-icon {
    width: 60px;
    height: 60px;
    background: var(--pale-lavender);
    color: var(--periwinkle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px;
}

.group-card h3 {
    margin-bottom: 10px;
    color: var(--slate);
}

.group-card p {
    font-size: 0.9rem;
    color: var(--slate);
    opacity: 0.8;
    margin-bottom: 15px;
    height: 40px;
    overflow: hidden;
}

.group-members {
    display: block;
    font-size: 0.8rem;
    color: var(--periwinkle);
    margin-bottom: 15px;
    font-weight: 500;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* General Layout Tweaks */
.card-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header-with-action h3 {
    margin-bottom: 0 !important;
}

.action-link {
    font-size: 0.9rem;
    color: var(--periwinkle);
    text-decoration: none;
    font-weight: 500;
}

.action-link:hover {
    text-decoration: underline;
}

.chart-legend {
    display: flex;
    gap: 15px;
}

.legend-item {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-item::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.legend-item.mood::before {
    background: var(--periwinkle);
}

.legend-item.stress::before {
    background: var(--blush);
}

.cool-input-container {
    position: relative;
    margin-top: 25px;
    width: 100%;
}

.cool-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-family: inherit;
    border: 2px solid var(--cool-gray);
    border-radius: 16px;
    background: var(--white);
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--slate);
}

.cool-input:focus {
    border-color: var(--periwinkle);
    box-shadow: 0 0 20px rgba(143, 132, 216, 0.2), inset 0 0 10px rgba(143, 132, 216, 0.05);
    background: #fff;
}

.cool-input-label {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    padding: 0 8px;
    color: var(--slate);
    opacity: 0.6;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cool-input:focus~.cool-input-label,
.cool-input:not(:placeholder-shown)~.cool-input-label {
    top: 0;
    font-size: 0.85rem;
    opacity: 1;
    color: var(--periwinkle);
}

.resource-card.book .resource-img {
    background: #EAF9F1;
    color: #48BB78;
}

.resource-card.video .resource-img {
    background: #FFF5F5;
    color: #F56565;
}

.resource-card.article .resource-img {
    background: #EBF8FF;
    color: #4299E1;
}

.resource-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.res-btn {
    padding: 8px 16px;
    border-radius: var(--radius-main);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    background: var(--pale-lavender);
    color: var(--periwinkle);
}

.res-btn:hover {
    background: var(--periwinkle);
    color: var(--white);
    transform: scale(1.05);
}

.settings-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.settings-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fc;
    border-radius: 12px;
    color: var(--slate);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.settings-link-item:hover {
    background: var(--white);
    border-color: var(--lavender);
    transform: translateX(5px);
    box-shadow: var(--soft-shadow);
    color: var(--periwinkle);
}

.settings-link-item i {
    opacity: 0.7;
}


/* Community Header Enhancement */
.community-header {
    background: linear-gradient(135deg, #8F84D8 0%, #B8B9E6 50%, #A9C1E8 100%);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    filter: blur(60px);
    animation: float 8s ease-in-out infinite;
}

.community-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 350px;
    height: 350px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(50px);
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

.community-header .greeting-container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.header-icon {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 32px rgba(143, 132, 216, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(143, 132, 216, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 40px rgba(143, 132, 216, 0.4);
    }
}

.header-icon i {
    font-size: 40px;
    color: var(--white);
}

.community-header h1 {
    font-size: 42px;
    margin-bottom: 12px;
}

.community-header .subtext {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 25px;
}

.community-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 25px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #ffffff;
    border: 1px solid rgba(143, 132, 216, 0.1);
    border-radius: var(--radius-main);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.3);
    /* transform: translateY(-2px); Removed */
}

.stat-item i {
    font-size: 18px;
}

/* Enhanced Tab Buttons */
.community-tabs {
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-btn {
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(143, 132, 216, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.tab-btn:hover::before {
    width: 300px;
    height: 300px;
}

.tab-btn.active {
    transform: scale(1.05);
}

/* Enhanced Create Post Card */
.create-post-card {
    animation: fadeInUp 0.6s ease-out;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border: 1px solid rgba(143, 132, 216, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-avatar-container {
    position: relative;
}

.avatar-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #48BB78;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.post-input-wrapper input {
    transition: all 0.3s;
}

.post-input-wrapper input:focus {
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(143, 132, 216, 0.1);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f2f5;
}

.post-options {
    display: flex;
    gap: 10px;
}

.option-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--pale-lavender);
    color: var(--periwinkle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.option-btn:hover {
    background: var(--periwinkle);
    color: var(--white);
    transform: scale(1.1) rotate(10deg);
}

.post-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    background: var(--grad-lavender-sky);
    color: var(--white);
    border: none;
    border-radius: var(--radius-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(143, 132, 216, 0.3);
}

.post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(143, 132, 216, 0.4);
}

.post-btn:active {
    transform: translateY(0);
}

.post-btn i {
    transition: transform 0.3s;
}

.post-btn:hover i {
    transform: translateX(3px);
}

/* Enhanced Post Cards */
.social-feed {
    animation: fadeIn 0.8s ease-out;
}

.post-card {
    animation: slideInLeft 0.5s ease-out;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(143, 132, 216, 0.15);
}

.post-avatar {
    border: 3px solid var(--pale-lavender);
    transition: all 0.3s;
}

.post-card:hover .post-avatar {
    border-color: var(--periwinkle);
    transform: scale(1.05);
}

.post-footer-btn i {
    transition: all 0.3s;
}

.post-footer-btn:hover i {
    transform: scale(1.2);
}

.post-footer-btn.liked i {
    animation: heartBeat 0.5s ease-in-out;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.1);
    }

    75% {
        transform: scale(1.25);
    }
}

/* Enhanced Groups Section */
.create-group-card {
    background: linear-gradient(135deg, var(--periwinkle) 0%, var(--lavender) 100%);
    color: var(--white);
    padding: 30px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(143, 132, 216, 0.3);
    position: relative;
    overflow: hidden;
}

.create-group-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: all 0.6s;
}

.create-group-card:hover::before {
    transform: translate(-25%, -25%);
}

.create-group-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(143, 132, 216, 0.4);
}

.action-icon {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.create-group-card:hover .action-icon {
    transform: rotate(90deg) scale(1.1);
}

.action-content {
    flex: 1;
}

.action-content strong {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
}

.action-content p {
    margin: 0;
    opacity: 0.95;
    font-size: 14px;
}

.action-arrow {
    font-size: 24px;
    transition: all 0.3s;
}

.create-group-card:hover .action-arrow {
    transform: translateX(10px);
}

.section-header {
    margin: 30px 0 20px;
}

.section-header h2 {
    color: var(--slate);
    font-size: 28px;
    margin-bottom: 5px;
}

.section-subtitle {
    color: var(--slate);
    opacity: 0.7;
    font-size: 15px;
    margin: 0;
}

/* Enhanced Group Cards */
.group-card {
    animation: fadeInScale 0.5s ease-out;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    position: relative;
    overflow: hidden;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--grad-lavender-sky);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.group-card:hover::before {
    transform: scaleX(1);
}

.group-icon {
    transition: all 0.3s;
}

.group-card:hover .group-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--periwinkle);
    color: var(--white);
}

/* Enhanced Chat Interface */
.chat-app-layout {
    animation: fadeIn 0.6s ease-out;
}

.chat-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f0f2f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--slate);
}

.new-chat-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--pale-lavender);
    color: var(--periwinkle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.new-chat-btn:hover {
    background: var(--periwinkle);
    color: var(--white);
    transform: rotate(90deg);
}

.contact-item {
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--periwinkle);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.contact-item:hover::before,
.contact-item.active::before {
    transform: scaleY(1);
}

.contact-item:hover {
    background: rgba(143, 132, 216, 0.05);
}

.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--periwinkle);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-name {
    font-weight: 600;
    color: var(--slate);
    font-size: 14px;
}

.contact-status {
    font-size: 12px;
    color: #48BB78;
}

.chat-window-header {
    padding: 20px;
    border-bottom: 1px solid #f0f2f8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-header-info #activeChatName {
    font-weight: 600;
    font-size: 16px;
    color: var(--slate);
}

.chat-status {
    font-size: 12px;
    color: var(--slate);
    opacity: 0.6;
}

.identity-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--pale-lavender);
    color: var(--periwinkle);
    border-radius: var(--radius-main);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.identity-badge:hover {
    background: var(--periwinkle);
    color: var(--white);
    transform: scale(1.05);
}

.chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--slate);
    opacity: 0.5;
    text-align: center;
    padding: 40px;
}

.chat-placeholder i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.chat-placeholder h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--slate);
}

.chat-placeholder p {
    font-size: 14px;
    margin: 0;
}

.chat-bubble {
    animation: messageSlide 0.3s ease-out;
    position: relative;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-bubble.sent {
    background: var(--grad-lavender-sky);
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 8px rgba(143, 132, 216, 0.2);
}

.chat-bubble.received {
    background: #f0f2f8;
    color: var(--slate);
    border-radius: 18px 18px 18px 4px;
}

.chat-time {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.7;
}

.chat-input-row {
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.chat-input-row input {
    transition: all 0.3s;
}

.chat-input-row input:focus {
    border-color: var(--periwinkle);
    box-shadow: 0 0 0 3px rgba(143, 132, 216, 0.1);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--periwinkle);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.send-btn:hover {
    background: var(--lavender);
    transform: scale(1.1) rotate(15deg);
}

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

/* Responsive Enhancements */


.dashboard-header {
    background: linear-gradient(135deg, rgba(143, 132, 216, 0.08) 0%, rgba(169, 193, 232, 0.08) 100%);
    padding: 50px 60px;
    border-radius: 32px;
    color: var(--slate);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: visible;
    box-shadow: 0 10px 40px rgba(143, 132, 216, 0.12);
    margin-bottom: 45px;
    min-height: 180px;
    border: 1px solid rgba(143, 132, 216, 0.15);
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(40px);
}

.dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(30px);
}

.header-content {
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    /* Better spacing to avoid overlap */
    height: 100%;
}

.greeting-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Allow wrapping if needed */
}

.dashboard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--slate);
}

.user-level-badge {
    background: var(--periwinkle);
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius-main);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(143, 132, 216, 0.3);
    border: none;
}

.dashboard-header .subtext {
    font-size: 0.95rem;
    opacity: 0.7;
    max-width: 550px;
    font-style: italic;
    line-height: 1.6;
    margin-top: 8px;
    color: var(--slate);
}

.header-widget {
    background: white;
    padding: 20px 30px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 1;
    border: 1px solid rgba(143, 132, 216, 0.1);
    box-shadow: 0 8px 25px rgba(143, 132, 216, 0.15);
    transition: transform 0.3s ease;
}

.header-widget:hover {
    transform: translateY(-5px);
}

.widget-icon {
    font-size: 1.5rem;
    color: var(--periwinkle);
}

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

.widget-label {
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate);
}

.widget-value {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--slate);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 2px 12px rgba(143, 132, 216, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(143, 132, 216, 0.06);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(143, 132, 216, 0.15);
    border-color: rgba(143, 132, 216, 0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.fire {
    background: linear-gradient(135deg, #fff0f0 0%, #ffe3e3 100%);
    color: #ff6b6b;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.15);
}

.stat-icon.star {
    background: linear-gradient(135deg, #fff9db 0%, #fff3bf 100%);
    color: #fcc419;
    box-shadow: 0 4px 10px rgba(252, 196, 25, 0.15);
}

.stat-icon.heart {
    background: linear-gradient(135deg, #f0f8ff 0%, #e7f3ff 100%);
    color: #4facfe;
    box-shadow: 0 4px 10px rgba(79, 172, 254, 0.15);
}

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate);
}

.stat-label {
    font-size: 0.9rem;
    color: #64748B;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Card Headers */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(143, 132, 216, 0.08);
}

.card-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header h3 i {
    color: var(--periwinkle);
}

/* Focus Card */
.focus-input-wrapper {
    display: flex;
    gap: 12px;
    background: #fdfdfd;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(143, 132, 216, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.focus-input-wrapper:focus-within {
    border-color: var(--periwinkle);
    background: white;
    box-shadow: 0 4px 20px rgba(143, 132, 216, 0.12);
}

.focus-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 1rem;
    color: var(--slate);
    outline: none;
    font-family: inherit;
}

.focus-save-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: var(--periwinkle);
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
}

.focus-save-btn:hover {
    transform: scale(1.05);
}

.focus-subtitle {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #888;
}

.progress-container {
    padding: 20px 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Stats Row - Large Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.stat-card-large {
    background: #ffffff;
    padding: 35px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 45px rgba(143, 132, 216, 0.1);
    display: flex;
    align-items: center;
    gap: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.stat-card-large:hover {
    box-shadow: 0 15px 50px rgba(143, 132, 216, 0.2);
}

.stat-card-large::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(143, 132, 216, 0.1) 0%, transparent 70%);
    border-radius: 0 0 0 100%;
}

.stat-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.stat-icon-wrapper.calendar {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #00bcd4;
}

.stat-icon-wrapper.fire {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #ef5350;
}

.stat-icon-wrapper.heart {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #ab47bc;
}

.stat-info h4 {
    font-size: 0.95rem;
    color: #aaa;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-info .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--slate);
    line-height: 1.1;
}

/* Chart Section Large */
.chart-section-large {
    background: #ffffff;
    border-radius: 35px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 60px rgba(143, 132, 216, 0.12);
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.chart-section-large::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(143, 132, 216, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.chart-container-large {
    height: 400px;
    width: 100%;
    position: relative;
    margin-top: 20px;
}

.chart-controls select {
    padding: 8px 15px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    font-family: inherit;
    color: var(--slate);
    outline: none;
    cursor: pointer;
    background: #fdfdfd;
    transition: all 0.2s;
}

.chart-controls select:hover {
    border-color: var(--periwinkle);
    color: var(--periwinkle);
}

/* History Section */
.history-section {
    background: #ffffff;
    border-radius: 35px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 60px rgba(143, 132, 216, 0.12);
}

.activity-list-container {
    margin-top: 20px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

/* New Activity Item Style */
.activity-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 15px;
    background: #fcfcfc;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: white;
    border-color: var(--periwinkle-light);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.activity-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-right: 20px;
    flex-shrink: 0;
}

/* Mood Colors for Icons */
.activity-icon.excellent {
    background: linear-gradient(135deg, #a5d6a7 0%, #66bb6a 100%);
}

.activity-icon.good {
    background: linear-gradient(135deg, #fff59d 0%, #fdd835 100%);
    color: #f57f17;
}

.activity-icon.neutral {
    background: linear-gradient(135deg, #eeeeee 0%, #bdbdbd 100%);
    color: #757575;
}

.activity-icon.low {
    background: linear-gradient(135deg, #ffccbc 0%, #ff7043 100%);
}

.activity-icon.bad {
    background: linear-gradient(135deg, #ef9a9a 0%, #ef5350 100%);
}

/* Journal and walk entries (no mood) */
.activity-icon.activity {
    background: linear-gradient(135deg, #99f6e4 0%, #0D9488 100%);
}

.activity-details {
    flex: 1;
}

.activity-date {
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 5px;
}

.activity-mood {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 10px;
}

.mood-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mood-badge.journal {
    background: rgba(143, 132, 216, 0.1);
    color: var(--periwinkle);
}

.mood-badge.symptoms {
    background: rgba(242, 166, 194, 0.1);
    color: var(--blush);
}

.symptoms-preview {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

.activity-metrics {
    display: flex;
    gap: 20px;
    margin-left: auto;
    /* Push to right */
    padding-left: 20px;
}

.metric-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 60px;
}

.metric-label {
    font-size: 0.75rem;
    color: #bbb;
    text-transform: uppercase;
}

.metric-val {
    font-weight: 600;
    color: var(--slate);
}

.export-btn {
    background: transparent;
    border: 1px solid var(--periwinkle);
    color: var(--periwinkle);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background: var(--periwinkle);
    color: white;
}

/* Progress Responsive */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-container-large {
        height: 300px;
    }

    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .activity-metrics {
        margin-left: 0;
        padding-left: 0;
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid #f0f0f0;
        padding-top: 15px;
    }
}

/* Tip Card */
.tip-card {
    background: linear-gradient(135deg, #ffffff 0%, rgba(143, 132, 216, 0.05) 100%);
    border: 1px solid rgba(143, 132, 216, 0.1);
}

.refresh-tip-btn {
    background: none;
    border: none;
    color: var(--periwinkle);
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.5s;
}

.refresh-tip-btn:hover {
    transform: rotate(180deg);
}

.tip-content {
    background: white;
    padding: 24px;
    border-radius: 18px;
    border-left: 4px solid var(--periwinkle);
    box-shadow: 0 4px 15px rgba(143, 132, 216, 0.05);
}

.tip-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--slate);
    font-weight: 500;
}

/* Quick Actions New */
.action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 15px;
    border: 1px solid rgba(143, 132, 216, 0.05);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fdfdfd;
    color: var(--slate);
    font-weight: 600;
}

.action-btn:hover {
    transform: translateY(-4px);
    background: white;
    box-shadow: 0 8px 24px rgba(143, 132, 216, 0.12);
    border-color: rgba(143, 132, 216, 0.15);
}

.btn-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    background: white;
    color: #aaa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.action-btn.checkin:hover .btn-icon {
    background: #e3f2fd;
    color: #2196f3;
}

.action-btn.breathe:hover .btn-icon {
    background: #e0f2f1;
    color: #009688;
}

.action-btn.journal:hover .btn-icon {
    background: #f3e5f5;
    color: #9c27b0;
}

.action-btn.game:hover .btn-icon {
    background: #fff3e0;
    color: #ff9800;
}


/* Chart Card */
.chart-container-mini {
    height: 120px;
    position: relative;
    width: 100%;
}

.chart-overlay-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #888;
}

.view-more {
    font-size: 0.9rem;
    color: var(--periwinkle);
    text-decoration: none;
    font-weight: 500;
}

/* Breathing Modal Styles */
.breathing-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 300px;
}

.breathing-circle-modal {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a7c5eb 0%, #8FB1E9 100%);
    box-shadow: 0 0 30px rgba(143, 177, 233, 0.4);
    margin-bottom: 30px;
    transition: transform 4s ease-in-out, background-color 4s ease;
    transform: scale(1);
    will-change: transform;
}

.breathing-text {
    font-size: 1.8rem;
    color: var(--slate);
    margin-bottom: 10px;
    font-weight: 600;
    min-height: 2.2rem;
}

.breathing-instruction {
    font-size: 1rem;
    color: #888;
    margin-bottom: 30px;
}

.close-modal-btn {
    padding: 10px 25px;
    border: none;
    background: white;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.close-modal-btn:hover {
    background: #f5f5f5;
    color: var(--slate);
}

/* WhatsApp and Instagram Community Cards */
.whatsapp-community-card,
.instagram-community-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-community-card {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(37, 211, 102, 0.02) 100%);
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.whatsapp-community-card:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15) 0%, rgba(37, 211, 102, 0.05) 100%);
    border-color: rgba(37, 211, 102, 0.4);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.2);
}

.whatsapp-icon {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.whatsapp-icon i {
    color: white !important;
}

.instagram-community-card {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.08) 0%, rgba(193, 53, 132, 0.02) 100%);
    border: 1px solid rgba(225, 48, 108, 0.2);
}

.instagram-community-card:hover {
    background: linear-gradient(135deg, rgba(225, 48, 108, 0.15) 0%, rgba(193, 53, 132, 0.05) 100%);
    border-color: rgba(225, 48, 108, 0.4);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.2);
}

.instagram-icon {
    background: linear-gradient(135deg, #E1306C 0%, #C13584 50%, #833AB4 100%);
}

.instagram-icon i {
    color: white !important;
}

.whatsapp-community-card .action-arrow,
.instagram-community-card .action-arrow {
    color: var(--slate);
    opacity: 0.6;
    transition: all 0.3s;
}

.whatsapp-community-card:hover .action-arrow {
    opacity: 1;
    color: #25D366;
}

.instagram-community-card:hover .action-arrow {
    opacity: 1;
    color: #E1306C;
}

/* Responsive Dashboard */
@media (max-width: 900px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        min-height: auto;
    }

    .header-content {
        width: 100%;
    }

    .dashboard-header .subtext {
        max-width: 100%;
    }

    .header-widget {
        width: 100%;
        justify-content: space-between;
    }

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .community-header {
        min-height: 240px;
    }

    .header-icon {
        width: 60px;
        height: 60px;
    }

    .header-icon i {
        font-size: 30px;
    }

    .community-header h1 {
        font-size: 32px;
    }

    .community-stats {
        flex-direction: column;
        gap: 10px;
    }

    .create-group-card {
        flex-direction: column;
        text-align: center;
    }

    .action-arrow {
        display: none;
    }

    .chat-app-layout {
        flex-direction: column;
        height: auto;
    }

    .chat-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #f0f2f8;
        max-height: 200px;
    }
}

/* Dashboard Toggle Feature */
.dashboard-header {
    position: relative;
    background: linear-gradient(135deg, #7F7FD5 0%, #86A8E7 50%, #91EAE4 100%);
    padding: 40px 50px;
    border-radius: 32px;
    color: var(--white);
    box-shadow: 0 15px 40px rgba(143, 132, 216, 0.2);
    margin-bottom: 40px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.dashboard-toggle-btn {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--periwinkle);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    box-shadow: 0 4px 15px rgba(143, 132, 216, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.dashboard-toggle-btn:hover {
    background: var(--periwinkle);
    color: var(--white);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(143, 132, 216, 0.35);
}

.dashboard-toggle-btn i {
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-toggle-btn.collapsed i {
    transform: rotate(180deg);
}

.dashboard-collapsible-content {
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s ease,
        margin-top 0.4s ease;
    max-height: 5000px;
    opacity: 1;
    margin-top: 0;
}

.dashboard-collapsible-content.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: -20px;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.greeting-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.greeting-wrapper h1 {
    font-size: 32px;
    font-weight: 600;
    margin: 0;
}

.user-level-badge {
    background: var(--periwinkle);
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: var(--radius-main);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-widget {
    position: absolute;
    top: 30px;
    right: 30px;
    background: var(--lavender);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 14px 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white !important;
}

.widget-icon {
    font-size: 24px;
}

.widget-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.widget-label {
    font-size: 12px;
    opacity: 0.9;
}

.widget-value {
    font-size: 14px;
    font-weight: 600;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--soft-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(143, 132, 216, 0.1);
}

.stat-card:hover {
    box-shadow: var(--hover-shadow);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.fire {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: var(--white);
}

.stat-icon.star {
    background: linear-gradient(135deg, #FFD93D 0%, #FFA500 100%);
    color: var(--white);
}

.stat-icon.heart {
    background: linear-gradient(135deg, var(--blush) 0%, #FF6B9D 100%);
    color: var(--white);
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--slate);
}

.stat-label {
    font-size: 14px;
    color: var(--slate);
    opacity: 0.7;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.focus-card,
.tip-card,
.actions-card,
.chart-card {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.focus-card:hover,
.tip-card:hover,
.actions-card:hover,
.chart-card:hover {
    box-shadow: var(--hover-shadow);
}

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

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--slate);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--periwinkle);
}

.refresh-tip-btn {
    background: none;
    border: none;
    color: var(--periwinkle);
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.refresh-tip-btn:hover {
    background: rgba(143, 132, 216, 0.1);
    transform: rotate(180deg);
}

.focus-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--bg-blue);
    padding: 4px;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.focus-input-wrapper:focus-within {
    border-color: var(--periwinkle);
    background: var(--white);
}

#dailyFocusInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 15px;
    color: var(--slate);
    outline: none;
}

.focus-save-btn {
    background: var(--periwinkle);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.focus-save-btn:hover {
    background: var(--lavender);
}

.focus-subtitle {
    font-size: 13px;
    color: var(--slate);
    opacity: 0.7;
    margin-top: 12px;
}

.tip-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--slate);
    transition: opacity 0.3s ease;
}

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

.action-btn {
    background: rgba(143, 132, 216, 0.08);
    border: 2px solid transparent;
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: var(--slate);
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(143, 132, 216, 0.15);
    border-color: var(--periwinkle);
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}

.action-btn.checkin .btn-icon {
    background: linear-gradient(135deg, var(--periwinkle) 0%, var(--lavender) 100%);
}

.action-btn.breathe .btn-icon {
    background: linear-gradient(135deg, var(--sky-blue) 0%, #89CFF0 100%);
}

.action-btn.journal .btn-icon {
    background: linear-gradient(135deg, var(--peach) 0%, #FFB88C 100%);
}

.action-btn.game .btn-icon {
    background: linear-gradient(135deg, var(--blush) 0%, #FF6B9D 100%);
}

.chart-container-mini {
    position: relative;
    width: 100%;
    height: 150px;
}

.chart-overlay-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--slate);
    opacity: 0.5;
    font-size: 14px;
}

.view-more {
    color: var(--periwinkle);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modern-settings {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(143, 132, 216, 0.1);
}

.settings-card-header i {
    font-size: 22px;
    color: var(--periwinkle);
    background: rgba(143, 132, 216, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.settings-card-header h3 {
    margin-bottom: 0 !important;
    font-size: 20px;
    font-weight: 600;
}

.modern-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(143, 132, 216, 0.03);
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(143, 132, 216, 0.05);
    transition: all 0.3s ease;
}

.modern-item:hover {
    background: rgba(143, 132, 216, 0.06);
    border-color: rgba(143, 132, 216, 0.2);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.item-info label {
    font-weight: 600;
    color: var(--slate);
    font-size: 16px;
}

.item-description {
    font-size: 13px;
    color: var(--slate);
    opacity: 0.7;
}

.select-wrapper {
    position: relative;
    width: 220px;
}

.select-wrapper select {
    width: 100%;
    padding: 12px 18px;
    padding-right: 40px;
    border-radius: 12px;
    border: 2px solid var(--cool-gray);
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    color: var(--slate);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--periwinkle);
    box-shadow: 0 0 0 4px rgba(143, 132, 216, 0.1);
}

.select-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--periwinkle);
    pointer-events: none;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.select-wrapper select:focus+.select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.view-more:hover {
    color: var(--lavender);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 20px;
    }

    .header-widget {
        position: static;
        margin-top: 15px;
    }

    .greeting-wrapper h1 {
        font-size: 24px;
    }

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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons-grid {
        grid-template-columns: 1fr;
    }
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--slate);
    margin-bottom: 5px;
    margin-top: 30px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}



.large-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.large-tool-card {
    height: 220px;
    border-radius: 28px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    image-rendering: -webkit-optimize-contrast;
}

.large-tool-card:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

.large-tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
    z-index: 1;
}

.large-tool-card:hover::before {
    background: rgba(0, 0, 0, 0);
}

.large-tool-card.thinking {
    background-image: url('../gallery/lake forest path.jpg');
}

.large-tool-card.chill {
    background-image: url('../gallery/15 Nature Retreats for the Ultimate Chill-Out Session.jpg');
}

.large-tool-card.action {
    background-image: url('../gallery/download (1).jpg');
}

.tool-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    z-index: 2;
    transition: all 0.3s ease;
}

.large-tool-card:hover .tool-overlay {
    background: rgba(255, 255, 255, 0.25);
    padding-bottom: 30px;
}

.tool-overlay h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Hide bottom nav on desktop */
@media (min-width: 768px) {
    .bottom-nav {
        display: none !important;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.nav-item i {
    font-size: 1.3rem;
}

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

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

.quick-relief-fab-wrapper {
    position: relative;
    top: -25px;
    z-index: 1001;
}

.quick-relief-fab {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--grad-lavender-sky);
    border: none;
    color: white;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(143, 132, 216, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.quick-relief-fab:hover {
    transform: scale(1.1) rotate(5deg);
}

.quick-relief-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 52, 54, 0.95);
    /* Solid dark overlay */
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.quick-relief-overlay.active {
    display: flex;
    opacity: 1;
}

.overlay-content {
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.overlay-title {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.relief-buttons-stack {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.relief-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s;
}

.relief-btn:hover {
    transform: translateX(10px);
}

.relief-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--periwinkle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.relief-btn span {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-overlay-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--slate);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Adjust Main Content for Bottom Nav */
@media (max-width: 1100px) {
    .main-content {
        padding-bottom: 120px;
    }
}

@media (min-width: 1100px) {
    /* Bottom nav now preferred even on larger screens in V2 */
}

/* Goals Section Styles */
.goals-section {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.goals-banner {
    width: 100%;
    height: 300px;
    border-radius: 30px;
    background-image: url('https://images.unsplash.com/photo-1518173946687-a4c8a9833d8e?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
}

.goals-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    height: 100%;
    color: white;
}

.goals-label {
    position: absolute;
    top: 20px;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

.goals-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 600px;
}

.compass-bg {
    font-size: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    z-index: -1;
    color: white;
}

.goals-quote {
    font-size: 1.4rem;
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 20px;
}

.new-goal-btn {
    background: var(--sky-blue);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: var(--radius-main);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(169, 193, 232, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-goal-btn:hover {
    box-shadow: 0 12px 30px rgba(169, 193, 232, 0.5);
    background: #97b5e3;
}

.my-goals-container {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--soft-shadow);
}

.goals-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 16px;
    background: var(--pale-lavender);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.goal-item:hover {
    border-color: var(--lavender);
    background: white;
    box-shadow: var(--soft-shadow);
}

.goal-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--periwinkle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: white;
}

.goal-item.completed .goal-checkbox {
    background: var(--periwinkle);
    border-color: var(--periwinkle);
}

.goal-item.completed .goal-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
}

.goal-text-wrapper {
    flex: 1;
}

.goal-text {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--slate);
}

.goal-item.completed .goal-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.goal-meta {
    font-size: 0.85rem;
    color: var(--slate);
    opacity: 0.7;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.goal-delete-btn {
    opacity: 0;
    color: #ef5350;
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px;
}

.goal-item:hover .goal-delete-btn {
    opacity: 1;
}

.empty-goals {
    text-align: center;
    padding: 40px;
    color: var(--slate);
    opacity: 0.6;
}

/* Floating Action Button */
.goal-fab {
    position: fixed;
    bottom: 100px;
    right: 110px; /* Shifted left to avoid overlap with Sunnie */
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--periwinkle);
    color: white;
    border: none;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(143, 132, 216, 0.5);
    cursor: pointer;
    z-index: 1500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.goal-fab i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.goal-fab:hover {
    background: var(--lavender);
}

@media (max-width: 600px) {
    .goal-fab {
        bottom: 80px;
        right: 20px;
    }
}

/* Modal Enhancements */
.goal-modal-content {
    max-width: 500px !important;
}

.goal-input-group {
    margin-bottom: 25px;
}

.goal-hint {
    margin-bottom: 15px;
    color: var(--slate);
    font-weight: 500;
}

.goal-modal-content textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--cool-gray);
    background: #f8f9fc;
    font-family: inherit;
    resize: none;
    transition: border-color 0.3s;
}

.goal-modal-content textarea:focus {
    border-color: var(--periwinkle);
    outline: none;
}

.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--slate);
    opacity: 0.6;
    margin-top: 5px;
}

.goal-checklist {
    background: var(--pale-lavender);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.goal-checklist p {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.goal-checklist ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.goal-checklist li {
    font-size: 0.9rem;
    color: var(--slate);
    opacity: 0.9;
}

.schedule-group {
    margin-bottom: 25px;
}

.schedule-group h3 {
    font-size: 1.2rem;
    color: var(--periwinkle);
    margin-bottom: 5px;
}

.schedule-group p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.date-input-wrapper {
    position: relative;
    width: 100%;
}

.goal-date-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--cool-gray);
    font-family: inherit;
}

.reminder-text {
    display: flex;
    gap: 10px;
    background: #fff8e1;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid var(--golden);
}

.reminder-text i {
    color: var(--golden);
    margin-top: 3px;
}

.reminder-text p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: #5d4037;
}


.new-goal-btn {
    background: var(--sky-blue);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: var(--radius-main);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(169, 193, 232, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.new-goal-btn:hover {
    box-shadow: 0 12px 30px rgba(169, 193, 232, 0.5);
    background: #97b5e3;
}

.my-goals-container {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--soft-shadow);
}

.goals-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.goal-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-radius: 16px;
    background: var(--pale-lavender);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.goal-item:hover {
    border-color: var(--lavender);
    background: white;
    box-shadow: var(--soft-shadow);
}

.goal-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--periwinkle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: white;
}

.goal-item.completed .goal-checkbox {
    background: var(--periwinkle);
    border-color: var(--periwinkle);
}

.goal-item.completed .goal-checkbox::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 12px;
}

.goal-text-wrapper {
    flex: 1;
}

.goal-text {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--slate);
}

.goal-item.completed .goal-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.goal-meta {
    font-size: 0.85rem;
    color: var(--slate);
    opacity: 0.7;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.goal-delete-btn {
    opacity: 0;
    color: #ef5350;
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px;
}

.goal-item:hover .goal-delete-btn {
    opacity: 1;
}

.empty-goals {
    text-align: center;
    padding: 40px;
    color: var(--slate);
    opacity: 0.6;
}

/* Floating Action Button - Refined Icon */
.goal-fab {
    position: fixed;
    bottom: 100px;
    right: 110px; /* Shifted left to avoid overlap with Sunnie */
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--periwinkle);
    color: white;
    border: none;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(143, 132, 216, 0.5);
    cursor: pointer;
    z-index: 1500;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.goal-fab i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.goal-fab:hover {
    background: var(--lavender);
}

@media (max-width: 600px) {
    .goal-fab {
        bottom: 80px;
        right: 20px;
    }
}

/* Modal Enhancements - Matched to Screenshot */
.goal-modal-content {
    max-width: 520px !important;
    border-radius: 32px !important;
    padding: 40px !important;
}

.goal-modal-title {
    color: #4A90E2;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.goal-hint {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.textarea-wrapper {
    position: relative;
    width: 100%;
}

.textarea-wrapper textarea {
    width: 100%;
    min-height: 140px;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid #E2E8F0;
    background: #FAFAFA;
    font-family: inherit;
    font-size: 1.05rem;
    resize: none;
    transition: all 0.3s;
}

.textarea-wrapper textarea:focus {
    border-color: #4A90E2;
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.char-counter {
    position: absolute;
    bottom: 15px;
    right: 20px;
    font-size: 0.85rem;
    color: #A0AEC0;
}

.goal-checklist-section {
    margin: 30px 0;
}

.checklist-title {
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.numbered-checklist {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.numbered-checklist li {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
}

.schedule-section {
    margin-bottom: 30px;
}

.schedule-title {
    color: #4A90E2;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.schedule-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.date-input-container {
    position: relative;
    width: 100%;
}

.goal-date-input {
    width: 100%;
    padding: 18px 25px;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    background: white;
    font-family: inherit;
    font-size: 1.1rem;
    color: var(--slate);
    cursor: pointer;
    transition: all 0.3s;
}

/* Healthy Thinking & Thought Journal Styles */
.trap-item.selected {
    border-color: var(--periwinkle) !important;
    background: rgba(143, 132, 216, 0.05) !important;
    transform: translateX(10px) !important;
}

.trap-icon {
    transition: all 0.3s ease;
}

.trap-item:hover .trap-icon {
    background: var(--bg-blue);
}

.challenge-card {
    border: none !important;
    background: white;
    transition: all 0.3s ease;
}

.challenge-header {
    background: linear-gradient(90deg, #4A90E2 0%, #81D4FA 100%) !important;
    border-radius: 20px 20px 0 0;
}

.challenge-body {
    border: 1px solid #E2E8F0;
    border-top: none;
    border-radius: 0 0 24px 24px;
}

.unbalanced-text {
    font-weight: 500;
}

.balanced-text {
    font-weight: 500;
}

.progress-stepper {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#step1 .step-circle {
    color: #81D4FA;
}

#step2 .step-circle {
    color: #8F84D8;
}

#step3 .step-circle {
    color: #F2A6C2;
}

@media (max-width: 768px) {
    .challenge-body {
        grid-template-columns: 1fr;
    }
}


.goal-date-input:focus {
    border-color: #4A90E2;
    outline: none;
}

.calendar-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #4A90E2;
    font-size: 1.4rem;
    pointer-events: none;
}

.goal-footer-reminder {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.reminder-icon-box {
    color: var(--slate);
    font-size: 1.5rem;
    margin-top: 2px;
}

.goal-footer-reminder p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #718096;
}

.modal-actions-centered {
    display: flex;
    justify-content: center;
    width: 100%;
}

.goal-submit-btn {
    background: linear-gradient(90deg, #81D4FA 0%, #B3E5FC 100%);
    color: white;
    border: none;
    padding: 18px 60px;
    border-radius: var(--radius-main);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(129, 212, 250, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 15px;
}

.goal-submit-btn span {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.goal-submit-btn:hover {
    box-shadow: 0 15px 35px rgba(129, 212, 250, 0.6);
    filter: brightness(1.05);
}

/* Background Image Utilities */
.bg-nature-retreat {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../gallery/15 Nature Retreats for the Ultimate Chill-Out Session.jpg');
    background-size: cover;
    background-position: center;
    color: white !important;
}

.bg-lake-path {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../gallery/lake forest path.jpg');
    background-size: cover;
    background-position: center;
    color: white !important;
}

.bg-calm-water {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../gallery/download (1).jpg');
    background-size: cover;
    background-position: center;
    color: white !important;
}

.bg-soft-gradient {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('../gallery/download.jpg');
    background-size: cover;
    background-position: center;
    color: white !important;
}

/* Ensure child text is white when on image background */
.bg-nature-retreat *,
.bg-lake-path *,
.bg-calm-water *,
.bg-soft-gradient * {
    color: white !important;
}

.bg-nature-retreat .subtext,
.bg-lake-path .subtext,
.bg-calm-water .subtext,
.bg-soft-gradient .subtext {
    opacity: 0.9;
}

.coping-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    /* Centered instead of flex-end for better desktop/tablet view */
    justify-content: center;
    padding: 20px;
}

.coping-modal.active {
    display: flex;
}

.coping-modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    padding: 30px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

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

.coping-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate);
}

.coping-modal-header button {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--slate);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-container {
    margin-bottom: 25px;
    min-height: 180px;
    display: flex;
    align-items: center;
}

.coping-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.coping-card p {
    font-size: 1.15rem;
    color: #334155;
    line-height: 1.6;
    font-weight: 500;
    font-style: italic;
}

.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.nav-arrow {
    background: white;
    border: 1px solid #e2e8f0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--periwinkle);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.nav-arrow:hover {
    background: var(--periwinkle);
    color: white;
    border-color: var(--periwinkle);
}

.indicator {
    display: flex;
    gap: 8px;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    transition: all 0.3s;
}

.indicator-dot.active {
    width: 24px;
    background: var(--periwinkle);
    border-radius: 4px;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    padding: 12px 20px;
    border-radius: 16px;
    /* Tech look: rounded rect instead of pill */
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.category-item i {
    font-size: 1.1rem;
    color: var(--periwinkle);
    transition: color 0.2s;
}

.category-item:hover {
    border-color: var(--periwinkle);
    color: var(--navy-deep);
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(143, 132, 216, 0.15);
}

.category-item.active {
    background: var(--periwinkle);
    color: white;
    border-color: var(--periwinkle);
    box-shadow: 0 5px 15px rgba(143, 132, 216, 0.4);
}

.category-item.active i {
    color: white;
}


.dashboard-header-modern {
    background: linear-gradient(135deg, #00897B, #4DB6AC);
    border-radius: 32px;
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 137, 123, 0.25);
    margin-bottom: 30px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-header-modern .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--accent-lavender);
    opacity: 0.2;
    z-index: 0;
}

.header-top-row {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.greeting-section {
    max-width: 70%;
}

.date-pill {
    background: rgba(255, 255, 255, 0.8);
    color: #444;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.greeting-info h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quote-text,
#dailyQuote {
    font-size: 0.95rem;
    opacity: 0.9;
    font-style: italic;
    font-weight: 300;
    max-width: 400px;
}

/* Level Ring */
.header-actions-group {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.level-ring-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.5s ease-in-out;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
}

.level-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.level-num {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
}

/* Fix for when script injects full text */
#userLevelBadge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#userLevelBadge i {
    display: none;
}

.level-text {
    font-size: 0.6rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bottom Row */
.header-bottom-row {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 20px;
}

.streak-badge {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.streak-badge i {
    color: #FF7043;
}

.checkin-hero-btn {
    background: white;
    color: #00897B;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-main);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.checkin-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background: #F0F4C3;
}

.dashboard-toggle-btn-modern {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.dashboard-toggle-btn-modern:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Stats Row Modern */
.stats-row-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card-modern {
    background: white;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.fire-gradient {
    background: linear-gradient(135deg, #FF7043, #FFAB91);
    box-shadow: 0 4px 10px rgba(255, 112, 67, 0.3);
}

.star-gradient {
    background: linear-gradient(135deg, #FFD54F, #FFE082);
    box-shadow: 0 4px 10px rgba(255, 213, 79, 0.3);
}

.heart-gradient {
    background: linear-gradient(135deg, #EC407A, #F48FB1);
    box-shadow: 0 4px 10px rgba(236, 64, 122, 0.3);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value-modern {
    font-size: 1.4rem;
    font-weight: 700;
    color: #37474F;
    line-height: 1.2;
}

.stat-label-modern {
    font-size: 0.8rem;
    color: #90A4AE;
    font-weight: 500;
}

@media (max-width: 600px) {
    .dashboard-header-modern {
        padding: 20px;
    }

    .header-top-row {
        flex-direction: column;
        gap: 20px;
    }

    .header-actions-group {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .greeting-info h1 {
        font-size: 1.8rem;
        max-width: 80%;
    }

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

    .header-bottom-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .checkin-hero-btn {
        justify-content: center;
        order: 1;
    }

    .streak-badge {
        justify-content: center;
        order: 2;
    }

    .dashboard-toggle-btn-modern {
        display: none;
    }
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.slider-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-header label {
    font-weight: 600;
    color: var(--slate);
    font-size: 0.95rem;
}

.slider-value {
    background: var(--periwinkle);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.custom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--periwinkle);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 3px rgba(143, 132, 216, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 5px rgba(143, 132, 216, 0.3);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Tags Section */
.checkin-tags-section {
    margin-bottom: 25px;
}

.checkin-tags-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--slate);
    margin-bottom: 12px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-chip {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-chip:hover {
    border-color: var(--periwinkle);
    color: var(--periwinkle);
    background: rgba(143, 132, 216, 0.05);
}

.tag-chip.selected {
    background: var(--periwinkle);
    color: white;
    border-color: var(--periwinkle);
    box-shadow: 0 4px 10px rgba(143, 132, 216, 0.2);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.card.focus-card,
.card.tip-card {
    position: relative;
    border: 1px solid rgba(143, 132, 216, 0.1);
    background: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.focus-card {
    border-left: 6px solid var(--periwinkle) !important;
}

.tip-card {
    border-left: 6px solid #FFD54F !important;
}

.focus-input-wrapper {
    display: flex;
    gap: 12px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 18px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s;
    margin-bottom: 12px;
}

.focus-input-wrapper:focus-within {
    border-color: var(--periwinkle);
    box-shadow: 0 0 0 4px rgba(143, 132, 216, 0.1);
    background: white;
}

.focus-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1.05rem;
    color: var(--slate);
    font-family: inherit;
    padding: 5px 10px;
}

.focus-save-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--periwinkle);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(143, 132, 216, 0.3);
}

.focus-save-btn:hover {
    transform: scale(1.05);
    background: #7a6fd6;
}

.focus-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 10px;
}

.refresh-tip-btn {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #FFB300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.refresh-tip-btn:hover {
    background: #FFF9C4;
    transform: rotate(180deg);
}

.tip-content {
    background: linear-gradient(135deg, rgba(255, 213, 79, 0.05), rgba(255, 213, 79, 0.1));
    padding: 24px;
    border-radius: 20px;
    border: 1px dashed rgba(255, 213, 79, 0.3);
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
}

.tip-content::before {
    content: '"';
    position: absolute;
    top: 5px;
    left: 15px;
    font-size: 3rem;
    color: rgba(255, 213, 79, 0.2);
    font-family: serif;
}

#wellnessTipText {
    font-size: 1.1rem;
    color: #5d4037;
    line-height: 1.6;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

/* Prompt/Success Notification for Daily Focus */
.focus-prompt {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(-200px);
    background: #0F766E; /* Solid Instagram blue */
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    width: max-content;
    max-width: 90%;
}

@media (max-width: 768px) {
    .focus-prompt {
        top: auto;
        bottom: 100px; /* Above the bottom nav */
        transform: translateX(-50%) translateY(200px);
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    .focus-prompt.active {
        transform: translateX(-50%) translateY(0);
    }
}

.focus-prompt.active {
    transform: translateX(-50%) translateY(0);
}

.focus-prompt i {
    font-size: 1.4rem;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: -100%; /* Fully hidden off-screen */
        width: 100%;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 10001 !important;
        background: var(--white);
        pointer-events: all;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 40px 20px;
    }

    .sidebar .menu-toggle {
        display: block !important;
    }

    .sidebar .collapse-btn {
        display: none !important;
    }

    .sidebar.menu-open {
        left: 0;
    }

    body.sidebar-open-dim {
        overflow: hidden;
    }

    body.sidebar-open-dim::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 10000;
        animation: fadeIn 0.3s ease;
    }

    .main-content {
        padding: 80px 15px 100px 15px !important; /* Top padding for bar */
        width: 100%;
    }

    .dashboard-header-modern {
        border-radius: 24px;
        min-height: auto;
        padding: 40px 15px;
        flex-direction: column;
        justify-content: flex-start;
    }

    .header-content-v2 {
        padding: 10px;
    }

    /* UNIQUE DASHBOARD MOBILE DESIGN: Snap-scrolling Highlights */
    .dashboard-collapsible-content {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* Horizontal Quick Actions Tray */
    .action-buttons-grid {
        display: flex !important;
        overflow-x: auto;
        padding: 10px 0 20px;
        gap: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .action-btn {
        flex: 0 0 130px !important;
        scroll-snap-align: start;
        border: 1px solid rgba(0,0,0,0.05) !important;
    }

    /* Mood/State Cards as "Stories" or Snap Cards */
    .snap-card {
        scroll-snap-align: center;
        width: 100%;
        margin-bottom: 20px;
    }

    .cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }


}

@media (max-width: 600px) {
    .header-content-v2 h1 { font-size: 1.8rem !important; }
    .hero-actions-row { flex-direction: column; gap: 12px; }
    .level-badge-modern, .streak-badge-modern { width: 100%; }
}
