:root {
    --work-color: #ff2d55;
    --off-color: #30d158;
    --nav-color: #0a0a0a;
    --accent-color: #bf5af2;
    --today-bg: #ffd60a;
    --bg: #0d0d0d;
    --card: #1a1a1a;
}

body {
    font-family: 'SF Pro Display', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: #fff;
    margin: 0;
    padding: 20px;
    font-size: 18px;
    background-image: 
        linear-gradient(transparent 0%, rgba(255,255,255,0.015) 50%, transparent 100%),
        radial-gradient(circle at 25% 30%, rgba(191,90,242,0.07) 0%, transparent 55%),
        radial-gradient(circle at 75% 70%, rgba(48,209,88,0.06) 0%, transparent 55%);
    background-size: 100% 4px, cover, cover;
    animation: bgshift 25s linear infinite;
}
@keyframes bgshift { 50% { background-position: 0 8px; } }
#status {
    max-width: 820px;
    margin: 20px auto;
    text-align: center;
}
#tonight {
    font-size: 2.4em;
    font-weight: 800;
    padding: 22px 40px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid rgba(255,255,255,0.08);
    display: inline-block;
}
.working { color: var(--work-color); }
.off { color: var(--off-color); }

#upcoming {
    max-width: 820px;
    margin: 25px auto;
    text-align: center;
}
#upcoming h3 {
    font-size: 1.1em;
    color: #888;
    margin-bottom: 12px;
    font-weight: 600;
}
#off-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.off-chip {
    background: var(--off-color);
    color: #000;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.05em;
}
#countdown::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 60%;
    height: 200%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shimmer 4.5s infinite;
}
@keyframes shimmer { 100% { transform: translateX(320%); } }
#countdown .particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
#countdown .particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    opacity: .4;
    animation: float 6s linear infinite;
}
@keyframes float {
    0% { transform: translateY(100%); opacity: .4; }
    100% { transform: translateY(-140%); opacity: 0; }
}
#countdown h2 {
    color: var(--accent-color);
    margin-bottom: 35px;
    font-size: 1.85em;
    font-weight: 700;
    letter-spacing: -0.02em;
    animation: glitch 2.4s infinite linear alternate;
}
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}
.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px;
    padding: 18px 28px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    font-size: 2.4em;
    font-weight: 800;
    color: #fff;
    min-width: 96px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform .2s cubic-bezier(0.23,1,0.32,1);
}
.time-unit:hover { transform: translateY(-4px) scale(1.02) rotate(2deg); }
.time-label {
    display: block;
    font-size: 0.9em;
    color: #7f8c8d;
    margin-top: 8px;
    font-weight: 600;
}
.legend {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 35px auto;
    max-width: 820px;
    flex-wrap: wrap;
    align-items: center;
}
.legend-item {
    font-size: 1.2em;
    font-weight: 700;
}
.calendar-nav {
    text-align: center;
    margin: 20px 0;
}
.calendar-nav button {
    padding: 14px 26px;
    margin: 0 10px;
    background: #222;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all .2s ease;
}
.calendar-nav button:hover {
    background: #333;
    transform: translateY(-1px) rotate(3deg);
}
.calendar-nav button:hover {
    filter: brightness(85%);
    transform: translateY(-2px);
}
#current-month-label {
    font-size: 1.2em;
    font-weight: bold;
}
#date-search {
    display: block;
    margin: 25px auto;
    padding: 14px 18px;
    font-size: 1.05em;
    max-width: 260px;
    background: #111;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    color: #fff;
    outline: none;
}
#search-result {
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    margin: 10px 0;
    min-height: 30px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 600;
    font-size: 0.95em;
}
.theme-btn {
    background: #222;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all .2s ease;
}
.theme-btn:hover {
    background: #333;
    transform: scale(1.1) rotate(12deg);
}
.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}
.work { background-color: #e74c3c; }
.off { background-color: #27ae60; }
.today {
    position: relative;
    background-color: #ccc;
}
.today::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(45deg, rgba(255,255,255,0.3), rgba(255,255,255,0.3) 5px, transparent 5px, transparent 10px);
    pointer-events: none;
}
table {
    border-collapse: collapse;
    width: 100%;
    max-width: 920px;
    margin: 40px auto;
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 25px 70px rgba(0,0,0,0.45);
}
caption {
    font-size: 1.95em;
    font-weight: 800;
    padding: 26px;
    background: #111;
    color: #fff;
    letter-spacing: -.03em;
}
th, td {
    border: 1px solid rgba(255,255,255,0.06);
    padding: 22px;
    text-align: center;
    font-weight: 700;
    font-size: 1.45em;
    min-width: 72px;
    height: 72px;
    transition: all .15s ease;
}
th {
    background-color: #ecf0f1;
    color: #2c3e50;
    font-size: 1.1em;
}
td:hover {
    background: rgba(255,255,255,0.07);
    transform: scale(1.15) rotate(4deg) skew(1deg);
    z-index: 2;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    filter: hue-rotate(25deg);
}
#current-month-label {
    font-size: 1.4em;
    font-weight: 800;
    margin: 0 15px;
}
#date-search {
    display: block;
    margin: 30px auto;
    padding: 14px;
    font-size: 1.3em;
    border: 2px solid #ddd;
    border-radius: 8px;
    max-width: 280px;
    width: 100%;
}
#search-result {
    text-align: center;
    font-weight: 700;
    font-size: 1.25em;
    margin: 22px 0;
    min-height: 38px;
    color: #fff;
    padding: 8px 24px;
    background: var(--card);
    border-radius: 999px;
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
    border: 1px solid rgba(255,255,255,0.06);
}
.work { background-color: var(--work-color); color: white; font-weight: 800; }
.off { background-color: var(--off-color); color: white; font-weight: 800; }
.today {
    position: relative;
    background-color: var(--today-bg);
    font-weight: 800;
    box-shadow: inset 0 0 0 4px #fff;
}
@media (max-width: 600px) {
    body { padding: 12px; font-size: 16px; }
    #countdown { padding: 32px 20px; margin: 15px auto; }
    #countdown h2 { font-size: 1.5em; }
    .time-unit { margin: 6px; padding: 14px 18px; font-size: 1.85em; min-width: 68px; }
    table { margin: 20px auto; }
    th, td { padding: 11px; font-size: 1.15em; min-width: 42px; height: 46px; }
    .calendar-nav button { padding: 12px 20px; font-size: .95em; }
    .legend { gap: 10px; }
    .legend-item { padding: 6px 12px; font-size: .9em; }
    #date-search { max-width: 100%; width: calc(100% - 40px); }
    #search-result { font-size: 1.1em; padding: 6px 16px; }
}