body {
    background-color: black;
    color: snow;
}

/* 旧UIを非表示 */
table#timeTable {
    display: none;
}

h1 {
    text-align: center;
    font-size: 100px;
}

div {
    text-align: center;
}

button {
    font-size: 30px;
    padding: 10px 20px;
    margin: 10px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

table {
    padding-top: 50px;
    margin: auto;
}

td {
    font-size: 30px;
}

input {
    text-align: center;
    font-size: 30px;
    width: 200px;
    background-color: #444;
    color: snow;
}

input:invalid {
    border: red solid 3px;
}

input[type=checkbox] {
    transform: scale(1.5);
    width: 30px;
}

label {
    font-size: 30px;
}


.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

#soundTestButtons {
    margin-top: 30px;
    padding: 20px;
    border-top: 2px solid #444;
}

#soundTestButtons h3 {
    margin-bottom: 15px;
    color: snow;
}

.sound-test-btn {
    font-size: 24px;
    padding: 8px 16px;
    margin: 5px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sound-test-btn:hover {
    background-color: #888;
}

.sound-test-btn:active {
    background-color: #333;
}

/* プリセットセクション */
.preset-section {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 1px solid #444;
    border-radius: 16px;
    padding: 10px 24px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.preset-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #fff;
    font-size: 24px;
    text-align: center;
}

.preset-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.preset-controls .modern-select {
    width: 100%;
    max-width: 400px;
    font-size: 16px;
    padding: 12px 16px;
}

.preset-controls .modern-select option {
    background: #1a1a1a;
    color: #fff;
}

.preset-btn,
.clear-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(33, 150, 243, 0.3);
    margin: 5px;
}

.clear-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    box-shadow: 0 4px 6px rgba(244, 67, 54, 0.3);
}

.preset-btn:hover {
    background: linear-gradient(135deg, #1976D2, #2196F3);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.4);
    transform: translateY(-2px);
}

.clear-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    box-shadow: 0 6px 12px rgba(244, 67, 54, 0.4);
    transform: translateY(-2px);
}

.preset-btn:active,
.clear-btn:active {
    transform: translateY(0);
}

@media (min-width: 600px) {
    .preset-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .preset-controls .modern-select {
        flex: 1;
        margin-right: 16px;
    }
}

/* モダンなタイマーセクション */
.timer-section {
    margin: 30px auto;
    max-width: 500px;
    padding: 0 20px;
}

.timer-list {
    margin-bottom: 30px;
}

.timer-item {
    background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 0px 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timer-item:hover {
    border-color: #666;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.timer-item.active {
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.timer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timer-time {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.timer-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timer-type {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.timer-type.repeat {
    background: #2196F3;
}

.delete-btn {
    background: #ff4444;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.delete-btn:hover {
    background: #ff6666;
    transform: scale(1.1);
}

.timer-status {
    display: none;
    height: 4px;
    background: #333;
    border-radius: 2px;
    margin-top: 12px;
    position: relative;
    overflow: hidden;
}

.timer-status.playing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #81C784);
    border-radius: 2px;
    animation: progress 1s ease-in-out infinite alternate;
}

@keyframes progress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* モダンなタイマー追加セクション */
.add-timer-section {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 1px solid #444;
    border-radius: 16px;
    padding: 10px 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.time-input-group {
    margin-bottom: 20px;
}

.time-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.time-number-input {
    width: 60px;
    height: 50px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #1a1a1a;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
}

.time-number-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.time-separator {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    margin-top: -20px;
}

.time-unit label {
    font-size: 12px;
    color: #999;
    font-weight: bold;
}

.timer-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.modern-checkbox input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: #1a1a1a;
}

.modern-checkbox input[type="checkbox"]:checked+.checkmark {
    background: #4CAF50;
    border-color: #4CAF50;
}

.modern-checkbox input[type="checkbox"]:checked+.checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.checkmark svg {
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
    color: white;
}

.checkbox-label {
    color: #fff;
    font-weight: 500;
    font-size: 20px;
}

.sound-label {
    color: #fff;
    font-weight: 500;
    font-size: 20px;
}

.sound-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sound-selector label {
    color: #fff;
    font-weight: 500;
}

.modern-select {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    color: #fff;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-select:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.add-timer-btn {
    width: 100%;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.3);
}

.add-timer-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.add-timer-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}
