:root {
    --radiant: #E8A598;
    --bright: #D4B896;
    --balanced: #89B0A0;
    --low: #9A9CC0;
    --stormy: #6B7280;
    --bg-primary: #1C1E26;
    --bg-secondary: #242833;
    --bg-card: #2A2F3C;
    --text-primary: #E4E4E7;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --border: #363B4A;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

.mood-orb {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mood-orb::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

.mood-orb:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.mood-orb.selected {
    transform: scale(1.15);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.mood-orb.selected::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

.orb-radiant { background: linear-gradient(135deg, #E8A598, #F0BDB3); }
.orb-bright { background: linear-gradient(135deg, #D4B896, #E0CBAE); }
.orb-balanced { background: linear-gradient(135deg, #89B0A0, #A3C4B6); }
.orb-low { background: linear-gradient(135deg, #9A9CC0, #B3B5D1); }
.orb-stormy { background: linear-gradient(135deg, #5C6370, #6E7681); }

.tag-pill {
    transition: all 0.25s ease;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
}

.tag-pill:hover {
    border-color: var(--text-secondary);
    background: var(--bg-secondary);
}

.tag-pill.active {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid var(--border);
}

.entry-bar {
    width: 4px;
    border-radius: 2px;
    min-height: 100%;
}

.nav-link {
    position: relative;
    color: var(--text-muted);
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--balanced);
    transition: width 0.3s;
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #89B0A0, #6A9A8A);
    color: var(--bg-primary);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(137, 176, 160, 0.3);
}

input[type="date"], input[type="time"] {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-primary);
    color-scheme: dark;
}

textarea {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text-primary);
}

textarea::placeholder {
    color: var(--text-muted);
}

.fade-in {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast {
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

textarea:focus, input:focus {
    outline: none;
    border-color: #2C3E50;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.mood-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    header .max-w-3xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    header .flex.items-center.justify-between {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    header nav {
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }

    header h1 {
        font-size: 1.5rem;
    }

    main {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .card {
        padding: 1rem;
        border-radius: 12px;
    }

    .mood-orb {
        width: 52px;
        height: 52px;
    }

    .mood-orb.selected {
        transform: scale(1.1);
    }

    /* Mood selection grid for mobile */
    .flex.justify-center.gap-6 {
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .flex.flex-col.items-center.gap-2 span {
        font-size: 0.65rem;
    }

    /* Date/time inputs stack on mobile */
    .flex.gap-4:has(input[type="date"]) {
        flex-direction: column;
        gap: 0.75rem;
    }

    .flex.gap-4:has(input[type="date"]) input {
        width: 100%;
    }

    /* Tag pills mobile optimization */
    .tag-pill {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    /* Stats grid mobile */
    .grid.grid-cols-2.md\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card p.text-3xl {
        font-size: 1.5rem;
    }

    /* Chart containers mobile */
    .h-64 {
        height: 200px;
    }

    .h-48 {
        height: 150px;
    }

    /* Save button mobile */
    .btn-primary {
        padding-top: 1rem;
        padding-bottom: 1rem;
        font-size: 0.8rem;
    }

    /* Toast mobile */
    #toast {
        left: 1rem;
        right: 1rem;
        transform: none;
        text-align: center;
    }

    /* Timeline entries mobile */
    #timeline-container .card {
        padding: 0.875rem;
    }

    /* Hide version badge on very small screens */
    .text-xs.px-2.py-0\.5.rounded-full {
        display: none;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.25rem;
    }

    header p {
        font-size: 0.75rem;
    }

    .mood-orb {
        width: 44px;
        height: 44px;
    }

    .nav-link {
        font-size: 0.75rem;
    }

    .card {
        padding: 0.875rem;
    }

    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    input[type="date"],
    input[type="time"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
