:root {
    --primary: #00796b;
    --accent: #80deea;
    --accent-dark: #4dd0e1;
    --bg-light: #e0f7fa;
    --bg-pink: #fce4ec;
    --text-dark: #333;
    --text-soft: #555;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(120deg, var(--bg-light), var(--bg-pink));
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    user-select: none;
}

#log-div-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

.app {
    max-width: calc(100% - 30px);
    margin: 3rem auto;
    padding: 2rem;
    border-radius: var(--radius);
    background: var(--glass-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    text-align: center;
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.quote {
    text-align: center;
    font-style: italic;
    color: var(--text-soft);
    margin-bottom: 2rem;
}

section {
    margin: 2rem 0;
}

section h2 {
    color: #274d00;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.3rem;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.habits {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.habit {
    background: var(--glass-bg);
    border: 1px solid var(--accent);
    padding: 0.9rem 1.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.habit:hover,
.habit:focus {
    background: var(--accent);
    color: #004d40;
    transform: scale(1.05);
}

#log-btn,
.button,
footer button {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    padding: 1.0rem 4rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#log-btn:hover,
.button:hover,
footer button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

#reflection-prompt {
    text-align: center;
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.4);
    padding: 1.2rem;
    border-radius: var(--radius);
    color: var(--primary);
    font-style: italic;
}

canvas {
    width: 100% !important;
    max-width: 700px;
    margin: 2rem auto;
    display: block;
}

#assistant-tip {
    background: rgba(255, 255, 255, 0.4);
    padding: 1.2rem;
    border-radius: var(--radius);
    color: #00695c;
    font-weight: 500;
}

#energyBar {
    height: 20px;
    background: linear-gradient(90deg, red, orange, yellow, green);
    border-radius: 12px;
    margin-top: 1rem;
    overflow: hidden;
}

footer {
    text-align: center;
    margin-top: 3rem;
}

footer button {
    margin: 0.5rem;
}

#streak-msg {
    margin-top: 1rem;
    color: #00695c;
    font-weight: bold;
}

@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }

    section h2 {
        font-size: 1.3rem;
    }

    #log-btn,
    .button,
    footer button {
        width: 100%;
        padding: 0.75rem 1rem;
    }
}