* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.container {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.timer-display {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #ddd;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timer-icon {
    font-size: 2.2rem;
    color: #2196F3;
    opacity: 0.8;
    margin-right: 10px;
}

.timer-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.timer-digits {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Timer minutes and seconds input styles */
#timer-minutes, #timer-seconds {
    min-width: 50px;
    display: inline-block;
    padding: 5px 2px;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: text;
    text-align: center;
    user-select: all;
    margin: 0;
    font-size: 3rem;
    font-weight: bold;
}

#timer-minutes:hover, #timer-seconds:hover {
    background: rgba(33, 150, 243, 0.1);
}

#timer-minutes:focus, #timer-seconds:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.3);
}

/* Colon style */
.timer-separator {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    padding: 0;
    margin: 0;
    width: 10px;
    text-align: center;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    min-width: auto; /* Override min-width from .timer-display span */
    box-shadow: none; /* Override box-shadow from .timer-display span */
    background: transparent; /* Override background from .timer-display span */
    cursor: default; /* Set cursor back to default */
}

/* Override extra styles */
.timer-separator:hover,
.timer-separator:focus {
    background: transparent;
    box-shadow: none;
}

.timer-wrapper:hover {
    background: rgba(33, 150, 243, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.timer-wrapper:not(.editable) {
    cursor: default;
}

.timer-wrapper:not(.editable) .edit-icon {
    display: none;
}

.timer-wrapper:not(.editable):hover::after {
    display: none;
}

.timer-wrapper::after {
    content: 'Edit time';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.timer-wrapper:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.edit-icon {
    font-size: 1.2rem;
    color: #2196F3;
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-left: 10px;
    position: absolute; 
    right: 15px;
}

.timer-wrapper:hover .edit-icon {
    opacity: 1;
    transform: rotate(15deg);
}

.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f0f0f0, #ffffff);
    border-radius: 15px;
    box-shadow: 5px 5px 15px #d1d1d1,
                -5px -5px 15px #ffffff;
}

button {
    padding: 12px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

button i {
    margin-right: 8px;
    font-size: 0.9em;
}

button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

button:not(:disabled):hover::after {
    transform: translateX(0);
}

button:not(:disabled):active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#start {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

#stop {
    background: linear-gradient(135deg, #f44336, #e53935);
}

#reset {
    background: linear-gradient(135deg, #2196F3, #1e88e5);
}

button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

button:disabled::after {
    display: none;
    transform: translateX(-100%);
}

button:disabled:hover::after,
button:disabled:active::after {
    transform: translateX(-100%);
    display: none;
}