:root {
    --primary: #695BF8;
    --secondary: #131308;
    --bg: #050507;
    --bg-elevated: #15151d;
    --text: #f5f5f7;
    --muted: #9b9ca5;
    --border-subtle: #252637;
    --radius-lg: 18px;
    --radius-md: 10px;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.55);
    --transition-fast: 160ms ease-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #1e1738 0, var(--bg) 45%, #000 100%);
}

body {
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.app-card {
    width: 100%;
    max-width: 1100px;
    background: linear-gradient(135deg, var(--secondary), #050509);
    border-radius: var(--radius-lg);
    padding: 26px 26px 24px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
}

.app-header {
    margin-bottom: 18px;
}

.app-header h1 {
    font-size: 26px;
    margin: 0 0 6px;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-header h1::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--primary);
    box-shadow: 0 0 18px rgba(105, 91, 248, 0.9);
}

.subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Search */

.search-wrapper {
    position: relative;
    margin-top: 16px;
    margin-bottom: 22px;
}

.search-wrapper::before {
    content: "⌕";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: var(--muted);
}

.search-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 36px;
    font-size: 15px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: rgba(5, 5, 12, 0.9);
    color: var(--text);
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.search-wrapper input::placeholder {
    color: var(--muted);
}

.search-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(105, 91, 248, 0.8),
                0 10px 25px rgba(0, 0, 0, 0.7);
    background: #050514;
    transform: translateY(-1px);
}

/* Grid of day columns */

.results.day-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

@media (max-width: 960px) {
    .results.day-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .results.day-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .results.day-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Day column */

.day-column {
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Header is the minimize/maximize handle */

.day-header {
    border: none;
    outline: none;
    padding: 10px 12px;
    width: 100%;
    background: linear-gradient(135deg, rgba(105, 91, 248, 0.3), rgba(105, 91, 248, 0.05));
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.day-header:hover {
    background: linear-gradient(135deg, rgba(105, 91, 248, 0.45), rgba(105, 91, 248, 0.08));
}

.day-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.day-label::before {
    content: "";
    width: 7px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), rgba(105, 91, 248, 0.15));
}

.day-toggle {
    font-size: 16px;
    line-height: 1;
    opacity: 0.85;
}

/* Column body */

.day-body {
    padding: 8px 10px 8px;
    max-height: 360px;
    overflow-y: auto;
    background: radial-gradient(circle at top left, rgba(105, 91, 248, 0.12), transparent 60%);
}

/* Scrollbar inside column */

.day-body::-webkit-scrollbar {
    width: 5px;
}
.day-body::-webkit-scrollbar-track {
    background: transparent;
}
.day-body::-webkit-scrollbar-thumb {
    background: rgba(155, 155, 180, 0.35);
    border-radius: 999px;
}
.day-body::-webkit-scrollbar-thumb:hover {
    background: rgba(155, 155, 180, 0.7);
}

/* Collapsed state */

.day-column.collapsed .day-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.day-column.collapsed .day-header {
    border-bottom: none;
}

/* Entries */

.entry {
    padding: 8px 2px;
    font-size: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.entry:first-of-type {
    border-top: none;
}

.entry b {
    font-weight: 600;
    line-height: 1.35;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
}

.badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.35);
}

.entry-empty {
    font-style: italic;
    color: var(--muted);
    text-align: center;
}

/* Mobile tweaks */

@media (max-width: 600px) {
    .app-card {
        padding: 20px 16px 18px;
        border-radius: 14px;
    }

    .app-header h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 12px;
    }
}
