/* ==== Seite: timer ==== */

body.page-timer .card-header {
    text-align: center;
    margin-bottom: 20px;
}

body.page-timer .card-header h1 {
    font-size: 2.1em;
    margin-bottom: 12px;
}

body.page-timer .card-header p {
    color: var(--c-muted);
    font-size: 1.02em;
    margin-bottom: 32px;
}

body.page-timer .tm-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* ==== Anzeige-Karte ==== */
body.page-timer .tm-card {
    width: 100%;
    max-width: 560px;
    min-height: 480px;
    border: 1px solid rgba(102, 126, 234, 0.18);
    border-radius: 18px;
    background: var(--c-surface);
    padding: 30px 22px 26px;
    text-align: center;
    overflow: hidden;
}

body.page-timer .tm-ring-wrap {
    position: relative;
    width: min(100%, 380px);
    margin: 0 auto;
    aspect-ratio: 1;
}

body.page-timer .tm-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

body.page-timer .tm-ring-track {
    fill: none;
    stroke: var(--c-surface-2, #e8ecfb);
    stroke-width: 12;
}

body.page-timer .tm-ring-progress {
    fill: none;
    stroke: var(--c-accent);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.2s linear, stroke 0.3s;
    filter: drop-shadow(0 0 6px rgba(102, 126, 234, 0.45));
}

body.page-timer .tm-ring-wrap.mid .tm-ring-progress { stroke: #f59e0b; filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5)); }
body.page-timer .tm-ring-wrap.warn .tm-ring-progress { stroke: #ef4444; filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.6)); }
body.page-timer .tm-ring-wrap.done .tm-ring-progress { stroke: #10b981; filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.6)); animation: tmPulse 1s infinite; }

@keyframes tmPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* Zentrierte Inhalte im Ring */
body.page-timer .tm-ring-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

body.page-timer .tm-time {
    font-size: clamp(2.2rem, 10vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

body.page-timer .tm-state {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--c-muted);
}

body.page-timer .tm-pct {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--c-accent);
}

body.page-timer .tm-progress {
    font-size: 0.75em;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
}

/* ==== Steuerung ==== */
body.page-timer .tm-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

body.page-timer .tm-btn {
    min-width: 110px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

body.page-timer .tm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

body.page-timer .tm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

body.page-timer .tm-btn-secondary {
    background: var(--c-surface-2, #eef1fb);
    color: var(--c-text);
    box-shadow: none;
    border: 1px solid var(--c-border);
}

body.page-timer .tm-btn-secondary:hover {
    background: rgba(102, 126, 234, 0.12);
    box-shadow: none;
}

/* ==== Optionen-Panel ==== */
body.page-timer .tm-panel {
    width: 100%;
    max-width: 560px;
    border: 1px solid rgba(102, 126, 234, 0.18);
    border-radius: 14px;
    background: var(--c-surface);
    padding: 16px 18px;
    overflow: hidden;
}

body.page-timer .tm-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92em;
    font-weight: 700;
    color: var(--c-text);
    margin-bottom: 12px;
}

body.page-timer .tm-panel-title i {
    color: var(--c-accent);
}

body.page-timer .tm-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

body.page-timer .tm-preset {
    padding: 8px 14px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-surface-2, #eef1fb);
    color: var(--c-text);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

body.page-timer .tm-preset:hover {
    background: rgba(102, 126, 234, 0.14);
    color: var(--c-accent);
}

body.page-timer .tm-preset.pomodoro {
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Zeit-Eingabe */
body.page-timer .tm-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

body.page-timer .tm-inputs input {
    width: 72px;
    padding: 9px 6px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
    font-variant-numeric: tabular-nums;
}

body.page-timer .tm-inputs .tm-colon {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--c-muted);
}

body.page-timer .tm-title-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 0.95em;
    box-sizing: border-box;
    margin-bottom: 12px;
}

/* Titel-Hinweis */
body.page-timer .tm-title-hint {
    font-size: 0.78em;
    color: var(--c-muted);
    margin: -6px 0 12px;
}

/* Titel im Ring */
body.page-timer .tm-title-display {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--c-accent);
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Kipp-Schalter (Sound / Notification) */
body.page-timer .tm-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    font-family: inherit;
}

body.page-timer .tm-switch-label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--c-text);
    cursor: pointer;
}

body.page-timer .tm-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

body.page-timer .tm-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

body.page-timer .tm-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--c-border, #cbd5e1);
    transition: background 0.2s;
}

body.page-timer .tm-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

body.page-timer .tm-switch input:checked + .tm-switch-track {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.page-timer .tm-switch input:checked + .tm-switch-track::after {
    transform: translateX(20px);
}

body.page-timer .tm-switch input:focus-visible + .tm-switch-track {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* ==== Info & SEO ==== */
body.page-timer .info-icon { font-size: 24px; }
body.page-timer .info-text { flex: 1; font-size: 14px; color: var(--c-accent); font-weight: 600; }
body.page-timer .info-text a { color: var(--c-accent); font-weight: 700; text-decoration: underline; }
body.page-timer .seo-section h3 { margin-top: 0; }
body.page-timer .seo-section p { margin-bottom: 26px; }
body.page-timer .faq-section { margin-top: 0; }

/* ==== Responsive ==== */
@media (max-width: 600px) {
    body.page-timer .tm-card,
    body.page-timer .tm-panel {
        padding: 22px 14px;
    }
    body.page-timer .tm-ring-wrap {
        width: min(100%, 320px);
    }
}

@media (max-width: 480px) {
    body.page-timer .tm-btn {
        flex: 1 1 40%;
        min-height: 48px;
    }
    body.page-timer .tm-preset {
        flex: 1 1 auto;
        text-align: center;
    }
    body.page-timer .tm-inputs input {
        width: 62px;
        padding: 10px 4px;
    }
    body.page-timer .tm-center {
        gap: 12px;
    }
}

@media (max-width: 380px) {
    body.page-timer .tm-controls {
        flex-direction: column;
    }
    body.page-timer .tm-btn {
        width: 100%;
        flex: none;
    }
}
