html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #111;
    color: #fff;
    font-family: Arial, sans-serif;
}

section {
    width: 100%;
}

.timer-section {
    height: calc(var(--vh, 1vh) * 100);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #111;
}

#title {
    color: #fd0;
}

.container {
    text-align: center;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.countdown {
    font-size: 12rem;
    font-weight: bold;
    color: #fd0;
}

.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

.bottom-right {
    position: absolute;
    right: 30px;
    bottom: 20px;
    text-align: right;
    transition: opacity 0.3s ease;
}

.bottom-left {
    position: absolute;
    left: 30px;
    bottom: 20px;
    text-align: left;
    transition: opacity 0.3s ease;
}

.bottom-hidden {
    opacity: 0;
    pointer-events: none;
}

.additional-timers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.additional-timer {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 1.3rem;
    color: #ccc;
    font-family: monospace;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 320px;
    user-select: none;
}

.timer-name {
    flex: 1;
    text-align: left;
}

.timer-end-time {
    text-align: center;
    min-width: 60px;
    margin: 0 12px;
}

.timer-remaining {
    text-align: right;
    min-width: 100px;
    font-family: monospace;
}

.delete-timer-btn {
    background: transparent;
    color: #666;
    border: none;
    width: 24px;
    height: 24px;
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.delete-timer-btn:hover {
    color: #f44;
}

.additional-timer.drag-over {
    border: 2px dashed #0df;
    background: rgba(0, 255, 255, 0.1);
}

.additional-timer {
    cursor: grab;
    touch-action: none; /* Prevent default touch behaviors on iPad */
}

.additional-timer:active {
    cursor: grabbing;
}

/* Touch feedback styles */
.additional-timer.touch-active {
    opacity: 0.4;
    transform: scale(1.05);
    transition: opacity 0.2s, transform 0.2s;
}

.current-time {
    font-family: monospace;
}

#timeLine {
    font-size: 3.1rem;
    font-weight: bold;
    color: #0df;
}

#dateLine {
    font-size: 1.3rem;
    color: #ccc;
}

.setup-section {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
    min-height: calc(var(--vh, 1vh) * 100);
    background: #222;
    padding: 40px;
    padding-bottom: 100px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.setup-container {
    max-width: 900px;
    width: 100%;
}

input {
    padding: 6px;
    font-size: .8rem;
    width: 70px;
    text-align: center;
}

button {
    padding: 6px 14px;
    font-size: .8rem;
    margin-left: 8px;
    cursor: pointer;
}

.quick-buttons span {
    font-weight: bold;
    margin-right: 10px;
}

/* Beautified and enlarged setup-section buttons */
.setup-section button:hover,
#quickBtnContainer button:hover,
#quickTweakContainer button:hover,
.setup-section button:focus,
#quickBtnContainer button:focus,
#quickTweakContainer button:focus {
    background: #fd0;
    color: #222;
    outline: none;
    transform: translateY(-2px) scale(1.04);
}

/* Primary action buttons */
#startBtn {
    background: #0df;
    color: #111;
}
#startBtn:hover, #startBtn:focus {
    background: #0af;
    color: #fff;
}

#stopBtn {
    background: #f44;
    color: #fff;
}
#stopBtn:hover, #stopBtn:focus {
    background: #c00;
    color: #fff;
}

#nowBtn {
    background: #fd0;
    color: #222;
}
#nowBtn:hover, #nowBtn:focus {
    background: #fff200;
    color: #111;
}

/* Quick buttons */
.quick-buttons button {
    padding: 12px 18px;
    font-size: 1rem;
    min-width: 80px;
    min-height: 40px;
    border-radius: 6px;
    margin: 6px 6px 6px 0;
}

.input-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}

.input-box label {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.input-box input[type="number"] {
    font-size: 1.2rem;
    padding: 10px;
    width: 90px;
    border-radius: 6px;
    border: 1px solid #444;
    margin-right: 8px;
    margin-left: 0;
    background: #181818;
    color: #fff;
}

.input-box input[type="number"]:focus {
    border-color: #0df;
    outline: none;
}

.quick-label, .set-time-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fd0;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-right: 18px;
}
.set-time-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    margin-bottom: 0px;
}
/* Unified button style for all quick, tweak, add, hour, half-hour, and set-time-row buttons */
.quick-buttons button,
#quickBtnContainer button,
#quickAddContainer button,
.tweak-row button,
#nowBtn button,
#startBtn button,
#stopBtn button,
.set-time-row button {
    min-width: 70px;
    min-height: 38px;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 0;
    border-radius: 6px;
    margin: 0px 4px 4px 0;
    background: #333;
    color: #fff;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: none;
}

.set-time-row input[type="number"] {
    height: 38px;
    font-size: 1.2rem;
    padding: 0 10px;
    width: 90px;
    border-radius: 6px;
    border: 1px solid #444;
    margin-right: 8px;
    margin-left: 0;
    background: #181818;
    color: #fff;
    box-sizing: border-box;
}

.set-time-row input[type="number"]:focus {
    border-color: #0df;
    outline: none;
}

.countdown-preview {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fd0;
    background: #222;
    padding: 8px 12px;
    border-radius: 6px;
    border: none;
    min-width: 80px;
    text-align: center;
    font-family: monospace;
}

.timer-select-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #444;
}

.timer-select-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fd0;
    letter-spacing: 1px;
    margin-right: 18px;
}

.timer-select {
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #181818;
    color: #fff;
    min-width: 120px;
}

.timer-select:focus {
    border-color: #0df;
    outline: none;
}

.add-timer-btn {
    min-width: 70px;
    min-height: 38px;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0px 4px 4px 0;
    background: #333;
    color: #fff;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: none;
}

.add-timer-btn:hover {
    background: #444;
}

.rename-timer-btn {
    min-width: 70px;
    min-height: 38px;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    margin: 0px 4px 4px 0;
    background: #333;
    color: #fff;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: none;
}

.rename-timer-btn:hover {
    background: #444;
}
