* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Schoolbell', cursive;
    text-align: center;
}

body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('images/chihiro043.png') no-repeat center center;
    background-size: cover;
    position: relative;
}

.background-button {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 10;
}

.container {
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 390px;
    margin: 0 20px;
}

h1 {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.mode-toggle {
    margin-bottom: 1rem;
}

.mode-button {
    padding: 0.5rem 1rem;
    margin: 0.3rem;
    border: none;
    border-radius: 19px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.7);
    color: black;
}

.mode-button.active {
    background-color: #6c63ff;
    color: white;
    transform: scale(1.05);
}

.timer-section, .stopwatch-section {
    display: none;
}

.timer-section.active, .stopwatch-section.active {
    display: block;
}

input {
    padding: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    width: 90%;
    background: transparent;
    border: 2.1px solid rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    color: black;
    outline: none;
}

input::placeholder {
    color: black;
}

.buttons {
    margin-bottom: 1rem;
}

button {
    padding: 0.5rem 1rem;
    margin: 0.5rem;
    border: none;
    border-radius: 19px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

#start, #stopwatchStart {
    background-color: #acf28e;
    color: black;
}

#start:hover, #stopwatchStart:hover {
    background-color: #97e576;
}

#pause, #stopwatchPause {
    background-color: #ffeb98;
    color: black;
}

#pause:hover, #stopwatchPause:hover {
    background-color: #f4da71;
}

#stop, #stopwatchStop {
    background-color: #f29595;
    color: black;
}

#stop:hover, #stopwatchStop:hover {
    background-color: #ee7171;
}

#stopwatchReset {
    background-color: #b3b3ff;
    color: black;
}

#stopwatchReset:hover {
    background-color: #9999ff;
}

.timer {
    font-size: 4.5rem;
    font-weight: bold;
    margin-top: 1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
}
  
.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
}
  
.modal button {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 19px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}
  
.modal button:hover {
    opacity: 0.8;
}
  
#confirmStop {
    background-color: #f29595;
    color: black;
}
  
#cancelStop {
    background-color: #acf28e;
    color: black;
}
