body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #ffffff;
    text-align: center;
    margin: 0;
    padding: 20px;
}

h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.timer-list-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background-color: #1e1e1e;
    border-radius: 8px;
    width: 50%;
    margin: 0 auto 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.timer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
}

.timer-list-container h2 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.8rem;
}

#main-timer-list {
    width: 100%;
}

.channel-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.channel-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #1e1e1e;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.channel-input-container label {
    font-weight: bold;
    margin-right: 5px;
}

#channels-count {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: #333;
    color: white;
    font-size: 1rem;
    width: 80px;
    text-align: center;
}

#update-channels-button {
    background-color: #4CAF50;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 20px;
    max-width: 80%;
    margin: 0 auto;
}

.timer-box {
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.timer-box:hover {
    transform: translateY(-3px);
}

.timer-box h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.timer-box p {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1px 0;
}

button {
    margin: 5px;
    padding: 8px 12px;
    border: none;
    background-color: #ff9800;
    color: #ffffff;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s, transform 0.1s;
}

button:hover {
    background-color: #e68900;
    transform: scale(1.05);
}

.blue-button {
    background-color: #2196F3;
}

.blue-button:hover {
    background-color: #0b7dda;
}

.sort-button {
    background-color: #4caf50;
    margin: 0;
}

.sort-button:hover {
    background-color: #388e3c;
}

.timer-entry {
    background-color: #222;
    padding: 12px;
    margin: 8px auto;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    font-size: 1.2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timer-entry span {
    display: flex;
    align-items: center;
}

.timer-entry .time-display {
    font-weight: bold;
    padding: 3px 8px;
    margin: 0 10px;
    border-radius: 4px;
}

.timer-entry .blue-time {
    background-color: rgba(33, 150, 243, 0.3);
    border-left: 3px solid #2196F3;
}

.timer-entry.expired {
    background-color: #333333;
    opacity: 0.8;
    color: #cccccc;
    border-left: 4px solid #f44336;
}

.reset-all-button {
    background-color: #f44336;
    padding: 12px 25px;
    font-size: 1.2em;
    margin-top: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.reset-all-button:hover {
    background-color: #d32f2f;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .timer-list-container {
        width: 70%;
    }
    .timer-header {
        flex-direction: column;
        gap: 10px;
    }
    .channel-input-container {
        flex-direction: column;
        padding: 15px;
    }
}

@media (max-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .timer-list-container {
        width: 90%;
    }
}

@media (max-width: 400px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}