:root {
    --bg-morning: #FFDEE9;
    --bg-day: #85FFBD;
    --bg-afternoon: #FFFB7D;
    --bg-evening: #21D4FD;
    --bg-night: #2C3E50;
    --text-color: #333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 2s ease;
    color: var(--text-color);
    overflow-x: hidden;
}

#sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

#sun, #moon {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    top: -100px;
    left: -100px;
}

#sun {
    background: radial-gradient(circle, #ffeb3b, #fbc02d);
    box-shadow: 0 0 50px #ffeb3b;
}

#moon {
    background: radial-gradient(circle, #f5f5f5, #bdbdbd);
    box-shadow: 0 0 20px #e0e0e0;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

#clock {
    font-size: 3rem;
    font-weight: bold;
}

#timer-container {
    font-size: 1.2rem;
    color: #666;
}

main {
    display: flex;
    gap: 40px;
}

.task-list-container {
    flex: 2;
    position: relative;
    max-height: 600px;
    overflow-y: hidden;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Increased gap between shift groups */
}

.shift-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shift-header {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
    padding-left: 10px;
    border-left: 5px solid rgba(0,0,0,0.2);
    color: rgba(0,0,0,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.list-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}

.task-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    cursor: help;
    transition: background-color 0.5s ease, transform 0.2s;
}

.task-item.overdue-warning {
    background-color: #ff9800 !important; /* Orange */
    color: white !important;
}

.task-item.overdue-danger {
    background-color: #f44336 !important; /* Red */
    color: white !important;
}

.task-item.overdue-warning .initials-input,
.task-item.overdue-danger .initials-input {
    background: rgba(255,255,255,0.2);
    color: white;
    border-color: white;
}

.task-item.overdue-warning .complete-btn,
.task-item.overdue-danger .complete-btn {
    background: white;
    color: #333;
}

.task-item:hover {
    transform: scale(1.02);
    transition: transform 0.2s;
}

.task-actions {
    display: flex;
    gap: 10px;
}

.initials-input {
    width: 60px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
    font-size: 1.2rem;
}

.complete-btn {
    padding: 10px 20px;
    border: none;
    background: #4CAF50;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

.completed-list-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
    padding: 15px;
    border-radius: 10px;
}

.completed-item {
    padding: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.completed-item .meta {
    font-size: 0.8rem;
    color: #777;
}

nav {
    padding: 10px;
    background: rgba(0,0,0,0.1);
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: bold;
}

.leaderboard-grid {
    margin-top: 2rem;
}
