#timer-popup {
    max-height: 65vh;
    touch-action: none;
}

#timer-popup .popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 0 40px;
}

#timer-header {
    margin-bottom: 24px;
}

#timer-exercise-name {
    color: var(--primary-color);
    font-size: 20px;
    text-align: center;
    margin: 0;
}

#timer-display-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

#timer-countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--popup-bg-dark);
    z-index: 10;
    border-radius: 16px;
}

#timer-countdown-overlay.hidden {
    display: none;
}

#timer-countdown-number {
    font-size: 120px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    animation: countdownSlideIn 0.5s ease-out;
}

@keyframes countdownSlideIn {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    50% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

@keyframes countdownSlideOut {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

@keyframes countdownDropDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

#timer-circle-container {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

#timer-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: var(--surface-color);
    stroke-width: 12;
}

.timer-circle-progress {
    fill: none;
    stroke: #405748;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 754; /* 2 * PI * 120 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s ease;
}

#timer-display {
    font-size: 43px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: 'Roboto', sans-serif;
    letter-spacing: 2px;
    z-index: 2;
}

#timer-progress {
    display: none;
}

#timer-progress-fill {
    display: none;
}

#timer-controls {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
}

#timer-controls .card-button {
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#timer-controls .card-button .material-symbols-rounded {
    font-size: 24px;
}

#timer-controls .card-button.hidden {
    display: none;
}

#timer-controls .success-button {
    background-color: #466e55;
}

#timer-controls .success-button:hover {
    background-color: #355242;
}

#timer-warning-popup .popup-content {
    text-align: center;
    padding: 24px 0 40px;
}

#timer-warning-popup h3 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

#timer-warning-popup p {
    color: var(--on-surface-color);
    margin-bottom: 24px;
    font-size: 14px;
}

#timer-warning-popup .popup-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
}

#timer-warning-popup .card-button {
    flex: 1;
    max-width: 160px;
}

html[data-theme='light'] #timer-display {
    color: var(--primary-color);
}

html[data-theme='light'] #timer-countdown-overlay {
    background-color: var(--popup-bg-light);
}

html[data-theme='light'] #timer-controls .success-button {
    background-color: #466e55;
    color: white;
}

html[data-theme='light'] #timer-controls .success-button:hover {
    background-color: #355242;
}

html[data-theme='light'] .timer-circle-bg {
    stroke: var(--surface-color);
}

html[data-theme='light'] .timer-circle-progress {
    stroke: #405748;
}

/* Responsive Anpassungen */
@media (max-width: 380px) {
    #timer-circle-container {
        width: 200px;
        height: 200px;
    }
    
    #timer-display {
        font-size: 32px;
    }
    
    #timer-countdown-number {
        font-size: 80px;
    }
}