* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
}

#timer-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

#timer-display {
    text-align: center;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 2px solid #e9ecef;
}

#time {
    display: block;
    font-size: 64px;
    font-weight: bold;
    color: #2c3e50;
}

#timer-label {
    display: block;
    text-align: center;
    margin-top: 20px;
    font-size: 24px;
    color: #49505a;
}

#timer-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#start-btn {
    background: #27ae60;
    color: white;
    font-weight: 600;
}

#start-btn:hover:not(:disabled) {
    background: #219a52;
}

#pause-btn {
    background: #f39c12;
    color: white;
    font-weight: 600;
}

#pause-btn:hover:not(:disabled) {
    background: #d35400;
}

#reset-btn {
    background: #e74c3c;
    color: white;
    font-weight: 600;
}

#reset-btn:hover:not(:disabled) {
    background: #c0392b;
}

#mode-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.mode-btn {
    padding: 12px 24px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.mode-btn:hover:not(:disabled) {
    background: #2980b8;
}

#countdown-input {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    flex-wrap: wrap;
}

#countdown-input label {
    font-weight: 600;
    color: #49505a;
}

#countdown-input input {
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 16px;
    width: 80px;
    text-align: center;
}

#start-countdown-btn {
    padding: 12px 24px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 600;
}

#start-countdown-btn:hover {
    background: #219a52;
}

#history {
    margin-top: 40px;
    border-top: 2px solid #e9ecef;
    padding-top: 30px;
}

#history h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

#history-list {
    margin-bottom: 20px;
}

.history-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #49505a;
    transition: all 0.3s;
}

.history-item:hover {
    background: #e9ecef;
}

#clear-history-btn {
    padding: 12px 24px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 600;
}

#clear-history-btn:hover {
    background: #c0392b;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    #timer-wrapper {
        padding: 10px;
    }

    #timer-display {
        padding: 20px;
        margin-bottom: 20px;
    }

    #time {
        font-size: 48px;
    }

    #timer-controls {
        flex-direction: column;
    }

    #countdown-input {
        flex-direction: column;
        align-items: center;
    }

    #countdown-input label {
        margin-bottom: 10px;
    }

    #countdown-input input {
        width: 70%;
    }

    .mode-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}
