/* -----------------------------
    ROOT VARIABLES + COLORS
------------------------------*/
:root {
    --orange: #ffb77c;
    --orange-soft: #ffe2c9;

    --blue: #9acaff;
    --blue-dark: #5a96d6;
    --blue-soft: #d9ecff;

    /*--card-bg: rgba(255, 255, 255, 0.72);*/
    --card-border: rgba(255, 255, 255, 0.3);

    --radius: 18px;
    --shadow-1: 0 6px 18px rgba(0,0,0,0.08);
    --shadow-2: 0 12px 30px rgba(0,0,0,0.12);

    --transition: 0.3s ease;
}

/* -----------------------------
    GLOBAL BODY
------------------------------*/
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f0f4f8;
    /* background: linear-gradient(90deg, #ffe8d6, #d9ecff); */
    color: #333;
}

/* -----------------------------
    NAVBAR / HEADER
------------------------------*/
.main-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between; /* logo left, menu right */
    align-items: center;
    padding: 18px 40px;
    background: rgba(255, 255, 255, 0.4); /* glass effect */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* Desktop nav links pushed right */
.navbar ul {
    display: flex;
    gap: 20px;
    margin-left: auto; /* pushes links all the way right */
    align-items: center;
}

.logo {
    height: 65px;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.navbar a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 6px 12px;
    border-radius: 6px;
}

.navbar a:hover,
.navbar a.active {
    color: #007bff;
    background-color: rgba(0, 119, 255, 0.1);
}


/* PROFILE IMAGE */
.pfp {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: var(--shadow-1);
}

/* ================= HAMBURGER - HIDDEN ON DESKTOP ================= */
.hamburger {
    display: none;          /* Hidden on desktop by default */
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    margin-left: auto;      /* Push to right when shown */
}


/* ================= IMPROVED DASHBOARD GRID ================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 30px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Individual card styling with hover effects */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    align-items: center;
    border-radius: var(--radius);
    padding: 28px;
    /* box-shadow: var(--shadow-1); */
    border: 1px solid var(--card-border);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out;
    border-color: rgba(0, 119, 255, 0.2);

}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= ENHANCED PROGRESS SECTION ================= */
.stats-card {
    grid-column: span 1;
    position: relative;
}

/* Progress bars section */
.progress-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.progress-item {
    margin-bottom: 15px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-header span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.progress-bar-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue), var(--blue-dark));
    transition: width 1s ease-in-out;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Quick Notes Section */
.quick-notes {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.quick-notes h3 {
    color: #555;
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    resize: none;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.notes-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(90, 150, 214, 0.1);
}

.notes-save {
    margin-top: 10px;
    padding: 8px 16px;
    background: var(--blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.notes-save:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}
/* ================= EMOTION CARD ENHANCEMENT ================= */
.emotion-card {
    grid-column: span 1;
}

.emoji-slider {
    display: flex;
    /* flex-direction: column; */
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    margin: 15px 0;

}

.emoji-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* padding: 0 10px; */
}

.emoji {
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.emoji:hover {
    transform: scale(1.4);
    background: rgba(255, 183, 124, 0.2);
}

.emoji.active {
    transform: scale(0.5);
    background: var(--orange-soft);
    box-shadow: 0 0 15px rgba(255, 183, 124, 0.5);
}

.slider {
    width: 90%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bcf7f, #4d96ff, #9d4edd);
    border-radius: 4px;
    outline: none;
    margin: 30px 10px 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--blue-dark);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* ================= IMPROVED TOOL BUTTONS ================= */
.tool-buttons {
    /* display: grid;
    grid-template-columns: repeat(2, 1fr); */
    gap: 16px; /* Increased from 12px */
    /* width: 100%; */
    margin: 25px 0; /* Increased from 20px */
}

.emoji-tool-btn {
    background: linear-gradient(135deg, var(--orange), #ff9a3c);
    display: flex;
    color: white;
    padding: 18px 16px; /* Increased padding */
    border-radius: 14px; /* Slightly more rounded */
    font-weight: 600;
    width: 400px;
    margin: 0;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    justify-content: center;
    gap: 22px; /* Increased gap */
    border: none;
    font-size: 0.95rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(255, 123, 0, 0.25); /* Softer shadow */
    min-height: 60px; /* Give buttons consistent height */
}
.tool-btn {
    background: linear-gradient(135deg, var(--orange), #ff9a3c);
    color: white;
    padding: 18px 16px; /* Increased padding */
    border-radius: 14px; /* Slightly more rounded */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column; /* Stack icon and text */
    align-items: center;
    justify-content: center;
    gap: 12px; /* Increased gap */
    border: none;
    font-size: 0.95rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(255, 123, 0, 0.25); /* Softer shadow */
    min-height: 100px; /* Give buttons consistent height */
}

.tool-btn:hover {
    transform: translateY(-5px) scale(1.03); /* More pronounced hover */
    box-shadow: 0 12px 30px rgba(255, 123, 0, 0.4);
    background: linear-gradient(135deg, #ff9a3c, var(--orange));
}

.tool-btn i {
    font-size: 1.8rem; /* Larger icons */
    margin-bottom: 5px; /* Space between icon and text */
    transition: transform 0.3s ease;
}

.tool-btn:hover i {
    transform: scale(1.2) rotate(5deg); /* Animated icon on hover */
}

.tool-btn span {
    line-height: 1.4; /* Better text spacing */
    font-size: 0.9rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px; /* Increased gap */
    margin-top: 20px; /* More space above */
}

/* Apply the same improved styles to these buttons too */
.tools-grid .tool-btn {
    background: linear-gradient(135deg, var(--blue-dark), #4d96ff); /* Different color for tools */
    box-shadow: 0 6px 20px rgba(77, 150, 255, 0.25);
}

.tools-grid .tool-btn:hover {
    background: linear-gradient(135deg, #4d96ff, var(--blue-dark));
    box-shadow: 0 12px 30px rgba(77, 150, 255, 0.4);
}

/* ================= RESPONSIVE ADJUSTMENTS ================= */
@media (max-width: 768px) {
    .tool-buttons {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 14px;
    }
    
    .tool-btn {
        padding: 16px;
        min-height: 90px;
        flex-direction: row; /* Side by side on mobile */
        justify-content: flex-start;
        text-align: left;
    }
    
    .tool-btn i {
        font-size: 1.6rem;
        margin-bottom: 0;
        margin-right: 15px; /* Space between icon and text */
    }
}

@media (min-width: 1200px) {
    .tool-buttons {
        gap: 20px; /* More space on larger screens */
    }
    
    .tool-btn {
        padding: 20px;
        min-height: 110px;
    }
}

/* Mood history section */
.mood-history {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
}

.mood-history h3 {
    color: #555;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#historyList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.history-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--blue);
    transition: all 0.2s ease;
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* ================= ACTIVITY CARDS ENHANCEMENT ================= */
.activity-card {
    grid-column: span 1;
}

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

.activity-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    gap: 20px;
}

.activity-item:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.activity-info {
    flex: 1;
}

.activity-info h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.2rem;
}

.activity-info p {
    margin: 4px 0;
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.join-btn {
    background: linear-gradient(135deg, var(--blue-dark), #4d96ff);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(77, 150, 255, 0.3);
}

.join-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(77, 150, 255, 0.4);
}

/* ================= ROADMAP / TIMELINE ENHANCEMENT ================= */
.timeline-card {
    grid-column: span 1;
}

.timeline {
    border-left: 3px solid var(--blue-dark);
    padding-left: 25px;
    margin-top: 15px;
    position: relative;
}

.timeline-step {
    margin-bottom: 25px;
    position: relative;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.timeline-step:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.timeline-step::before {
    content: "";
    width: 16px;
    height: 16px;
    position: absolute;
    left: -34px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--blue-dark);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 4px var(--blue-dark);
    z-index: 2;
}

.timeline-step.completed::before {
    background: var(--orange);
    box-shadow: 0 0 0 4px var(--orange);
}

.timeline-step.current::before {
    background: var(--blue);
    box-shadow: 0 0 0 4px var(--blue), 0 0 15px rgba(77, 150, 255, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 4px var(--blue), 0 0 15px rgba(77, 150, 255, 0.5); }
    50% { box-shadow: 0 0 0 6px var(--blue), 0 0 25px rgba(77, 150, 255, 0.7); }
}

.step-content h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

.step-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* ================= TASK LIST ENHANCEMENT ================= */
.tasks-card {
    grid-column: span 1;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.task-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid var(--blue);
    border-radius: 6px;
    margin-right: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.task-item input:checked + .checkmark {
    background: var(--blue);
    border-color: var(--blue);
}

.task-item input:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    color: white;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.task-text {
    flex: 1;
    font-size: 1rem;
    color: #333;
}

.task-text.completed {
    text-decoration: line-through;
    color: #999;
}

.task-deadline {
    background: var(--orange-soft);
    color: #d35400;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ================= FOOTER (Add to match theme) ================= */
footer {
    background: #f8f9fa;
    padding: 40px 5%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    border-top: 1px solid #e0e0e0;
    margin-top: 60px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-left img {
    height: 45px;
}

.footer-left p {
    color: #555;
    line-height: 1.7;
    max-width: 300px;
    margin: 0;
}

/* ================= RESPONSIVE ================= */
/* ================= MOBILE HAMBURGER MENU ================= */
@media (max-width: 700px) {
    /* Header layout - logo left, hamburger right */
    .main-header {
        flex-direction: row;
        justify-content: space-between; /* Logo left, hamburger right */
        align-items: center;
        padding: 12px 20px;
    }
    
    /* Logo stays on left */
    .logo {
        height: 50px;
        order: 1; /* First item (left) */
    }
    
    /* Hamburger button - show on mobile */
    .hamburger {
        display: block;          /* Show hamburger on mobile */
        margin-left: 0;          /* Don't push - controlled by order */
        font-size: 28px;
        cursor: pointer;
        background: none;
        border: none;
        color: #333;
        padding: 5px;
        order: 3;               /* Last item (far right) */
        z-index: 101;           /* Above everything */
    }
    
    /* Hide the regular navigation menu on mobile */
    .navbar {
        order: 2; /* This keeps nav in middle if needed, but it will be hidden */
        width: 100%;
        margin-top: 10px;
    }
    
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        padding: 15px 15px; /* padding instead of margin */
        margin: 0;

        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        z-index: 100;
    }

    /* Show menu when toggled */
    .navbar ul.show {
        display: flex;
    }
    
    /* Menu items styling */
    .navbar li {
        width: 100%;
        text-align: center;
    }
    
    .navbar a {
        display: block;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-size: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .navbar li:last-child a {
        border-bottom: none;
    }
    
    /* Active state for mobile menu */
    .navbar a.active {
        background: rgba(0, 119, 255, 0.1);
        color: #0077ff;
        font-weight: 600;
    }
    
    /* Mobile adjustments for dashboard content */
    .dashboard-grid {
        padding: 15px;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .emoji-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .emoji {
        font-size: 2rem;
    }
}

/* ================= SMALL MOBILE (Optional extra adjustments) ================= */
@media (max-width: 480px) {
    .main-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
    }
    
    /* Logo stays on left */
    .logo {
        height: 50px;
        order: 1; /* First item (left) */
    }
    
    /* Hamburger button - show on mobile */
    .hamburger {
        display: block;          /* Show hamburger on mobile */
        margin-left: 0;          /* Don't push - controlled by order */
        font-size: 28px;
        cursor: pointer;
        background: none;
        border: none;
        color: #333;
        padding: 5px;
        order: 3;               /* Last item (far right) */
        z-index: 101;           /* Above everything */
    }
    
    /* Hide the regular navigation menu on mobile */
    .navbar {
        order: 2; /* This keeps nav in middle if needed, but it will be hidden */
        width: 100%;
        margin-top: 10px;
    }
    
    .navbar ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        padding: 15px 15px; /* padding instead of margin */
        margin: 0;

        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        z-index: 100;
    }

    /* Show menu when toggled */
    .navbar ul.show {
        display: flex;
    }
    
    /* Menu items styling */
    .navbar li {
        width: 100%;
        text-align: center;
    }
    
    .navbar a {
        display: block;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        font-size: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .navbar li:last-child a {
        border-bottom: none;
    }
    
    /* Active state for mobile menu */
    .navbar a.active {
        background: rgba(0, 119, 255, 0.1);
        color: #0077ff;
        font-weight: 600;
    }
    .emoji-tool-btn {
        width: 100%;
        max-width: 400px;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .tool-btn {
        padding: 14px;
        min-height: 85px;
    }
    
    .tool-btn i {
        font-size: 1.5rem;
    }
    
    .main-header {
        padding: 10px 15px;
    }
    
    .logo {
        height: 45px;
    }
    
    .hamburger {
        font-size: 24px;
    }
    
    .navbar ul {
        margin: 0 10px;
    }
}
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 30px 40px;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 20px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);

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

    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .join-btn {
        width: 100%;
        justify-content: center;
    }
    
    footer {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .footer-left {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
        max-width: 200px;
    }
    
    .stat-card {
        max-width: 200px;
        padding: 15px;
    }
    
    .emoji-slider {
        display: flex;
        /* flex-direction: column; */
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        margin: 15px 0;

    }

    .emoji-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        /* padding: 0 10px; */
    }
    

    .emoji.active {
        transform: scale(1.5);
        background: var(--orange-soft);
        box-shadow: 0 0 15px rgba(255, 183, 124, 0.1);
    }
    .emoji {
        font-size: 2rem;
        cursor: pointer;
        transition: all 0.3s ease;
        padding: .5px;
        margin:0 10px;
        border-radius: 50%;
    }

    .emoji:hover {
        transform: scale(1.4);
        background: rgba(255, 183, 124, 1);
    }
}