body {
    font-family: -apple-system, sans-serif;
    background: #000;
    color: #fff;
    margin: 0;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* ===== 共用區塊 ===== */

.setting-box {
    background: #222;
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #444;
    text-align: center;
    box-sizing: border-box;
}

.card {
    background: #1a1a1a;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 15px;
    border: 1px solid #333;
    box-sizing: border-box;
}

/* ===== 炎魔專用 ===== */

.card-loop {
    border-left: 8px solid #00ffcc;
}

.card-time {
    border-left: 8px solid #feca57;
}

.card-smoke-time {
    border-left: 8px solid #a5a5a5;
}

/* ===== 龍王專用 ===== */

.card-dispel {
    border-left: 8px solid #ff6b6b;
}

.card-seal {
    border-left: 8px solid #9b59b6;
}

/* ===== 文字 ===== */

.title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.timer-display {
    font-size: 4.5rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin: 5px 0;
}

/* ===== 按鈕共用 ===== */

.btn {
    padding: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    border-radius: 12px;
    width: 100%;
    height: 80px;
    font-weight: bold;
    -webkit-appearance: none;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.start-btn {
    background: #444;
    color: #fff;
}

.delay-btn {
    background: #2e86de;
    color: #fff;
    font-size: 0.9rem;
}

.mode-btn {
    background: #d35400;
    color: #fff;
    font-size: 0.9rem;
}

.stop-btn {
    background: #ff4757;
    color: #fff;
    font-size: 0.8rem;
    padding: 5px;
    margin-top: 5px;
    height: auto;
    display: inline-block;
}

.back-btn {
    background: #e67e22;
    color: #fff;
    height: 60px;
}

/* ===== active 狀態 ===== */

.active-loop {
    background: #00ffcc !important;
    color: #000 !important;
}

.active-time {
    background: #feca57 !important;
    color: #000 !important;
}

.active-smoke {
    background: #a5a5a5 !important;
    color: #000 !important;
}

.active {
    background: #00ffcc !important;
    color: #000 !important;
}

/* ===== UI 補助 ===== */

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #666;
    color: #fff;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 1rem;
    margin-left: 8px;
    cursor: help;
}

.blink {
    animation: blinker 0.4s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0.3;
    }
}

/* ===== input ===== */

input[type=range] {
    width: 90%;
    margin-top: 5px;
}

label {
    font-size: 0.8rem;
    color: #aaa;
}

/* ===== footer ===== */

footer {
    margin-top: 30px;
    padding: 20px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    width: 100%;
}