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

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

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    text-align: center;
}

h1 {
    margin-bottom: 30px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.setup-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
}

input, select {
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

input:focus, select:focus {
    background: rgba(255, 255, 255, 0.3);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

select {
    cursor: pointer;
}

option {
    background: #764ba2;
    color: #fff;
}

.sound-selection {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 12px;
    width: 100%;
}
.sound-left { display: flex; align-items: center; gap: 10px; }
.sound-right { display: flex; align-items: center; gap: 8px; justify-content: flex-end; width: 100%; }

#voice-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 180px;
    max-width: 100%;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(to right, #38ef7d 0%, #38ef7d var(--v, 80%), rgba(255,255,255,0.2) var(--v, 80%), rgba(255,255,255,0.2) 100%);
    transition: background 0.2s ease;
}

#voice-volume::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
    border-radius: 999px;
}

#voice-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

#voice-volume::-moz-range-track {
    height: 4px;
    background: transparent;
    border-radius: 999px;
}

#voice-volume::-moz-range-progress {
    height: 4px;
    background: #38ef7d;
    border-radius: 999px 0 0 999px;
}

#voice-volume::-moz-range-thumb {
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    background: transparent;
    box-shadow: none;
    border: none;
}

.volume-icon {
    font-size: 20px;
    width: 1.4em;
    text-align: center;
}

 

.hero-title {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    pointer-events: none;
    z-index: 2;
}

 

.title-stroke {
    font-size: 56px;
    font-weight: 800;
    fill: url(#titleGrad);
    stroke: rgba(0,0,0,0.6);
    stroke-width: 2.5px;
    stroke-dasharray: 6 6;
    animation: dash 6s linear infinite, glow 3s ease-in-out infinite;
}

 

@keyframes dash {
    to { stroke-dashoffset: 200; }
}

@keyframes glow {
    0%,100% { filter: drop-shadow(0 0 6px rgba(255,255,255,0.4)); }
    50% { filter: drop-shadow(0 0 18px rgba(255,255,255,0.9)); }
}

.bg-anim {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bubble { animation: float 18s ease-in-out infinite; }
.bubble.b1 { animation-duration: 22s; }
.bubble.b2 { animation-duration: 16s; }
.bubble.b3 { animation-duration: 26s; }

@keyframes float {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-20px) translateX(10px) scale(1.05); opacity: 0.7; }
    100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.4; }
}

.todo-container { margin-top: 24px; }
.todo-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 12px; }
.todo-list { list-style: none; padding: 0; margin: 0; }
#todo-list { max-height: 132px; overflow: auto; }
.todo-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 8px; background: rgba(255,255,255,0.12); margin-bottom: 8px; }
.todo-text { flex: 1; text-align: left; }
.todo-actions { display: flex; gap: 8px; }
.todo-done { text-decoration: line-through; opacity: 0.6; }

.todo-time { font-size: 12px; opacity: 0.8; margin-top: 4px; }

.split-layout {
    width: 90%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}
.split-layout .container { width: 100%; max-width: none; }
 .split-layout .container { height: 300px; }
 

#list-container { overflow: hidden; }

.primary-btn, .control-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.primary-btn {
    background: #6a11cb;
    color: white;
    font-weight: 500;
}

.primary-btn:hover {
    background: #7d21e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 17, 203, 0.4);
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

#test-sound {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

#test-sound:hover {
    background: rgba(255, 255, 255, 0.3);
}

.countdown-container {
    margin-top: 20px;
}

.time-display {
    font-size: 3rem;
    font-weight: 300;
    margin: 20px 0;
    letter-spacing: 2px;
}

.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    margin: 30px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #11998e, #38ef7d);
    border-radius: 5px;
    transition: width 1s linear;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

#completion-container {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.completion-message {
    margin: 30px 0;
    font-size: 1.2rem;
}

.rest-message {
    font-size: 1.5rem;
    margin-top: 15px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }
    .time-display {
        font-size: 2.5rem;
    }
}

body.theme-focus {
    background-image: url('../images/bg_focus_desktop_01.jpg');
    background-size: cover;
    background-position: center;
}

body.theme-rest {
    background-image: url('../images/bg_rest_desktop_01.jpg');
    background-size: cover;
    background-position: center;
}

@media (max-width: 768px) {
    body.theme-focus {
        background-image: url('../images/bg_focus_mobile_01.webp');
    }
    body.theme-rest {
        background-image: url('../images/bg_rest_mobile_01.webp');
    }
}

@media (max-width: 768px) {
    .split-layout {
        width: 92%;
        max-width: 640px;
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: start;
    }
    .split-layout .container {
        height: auto;
    }
    #list-container {
        overflow: visible;
    }
    body {
        align-items: flex-start;
        padding-top: calc(env(safe-area-inset-top) + 20px);
    }
    .hero-title {
        display: none;
    }
    .title-stroke {
        font-size: 32px;
    }
    .container {
        width: 100%;
        padding: 24px 16px;
        border-radius: 16px;
    }
    .input-group, .todo-inputs {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .input-group input, .input-group select, .todo-inputs input, .todo-inputs button {
        width: 100%;
    }
    .sound-selection {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }
    .sound-right {
        justify-content: center;
    }
    #voice-volume {
        width: 100%;
    }
    .primary-btn, .control-btn {
        min-height: 44px;
    }
    .time-display {
        font-size: 2.2rem;
        letter-spacing: 0;
    }
    #todo-list {
        max-height: 260px;
    }
}

@media (max-width: 480px) {
    .title-stroke {
        font-size: 28px;
    }
    body {
        padding-top: calc(env(safe-area-inset-top) + 20px);
    }
    .split-layout {
        width: 94%;
        gap: 12px;
    }
    .time-display {
        font-size: 2rem;
    }
    #todo-list {
        max-height: 320px;
    }
}
