/* ============================================
    TIMER - UI (Breakdown, Achievement, Tip, Responsivo)
    ============================================ */

/* GLOW ANIMADO */
.st-timer-glow {
    position: absolute;
    inset: -60px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.4;
    pointer-events: none;
    animation: timerPulse 3s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.08); }
}

/* NÚMEROS PRINCIPAIS */
.st-timer-display {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 18vw, 6rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    line-height: 1;
    text-shadow: 
        3px 3px 0 #000,
        0 0 50px var(--accent-glow),
        0 0 100px rgba(229, 229, 229, 0.2);
    position: relative;
    z-index: 2;
    animation: timerGlow 4s ease-in-out infinite;
}

@keyframes timerGlow {
    0%, 100% { 
        text-shadow: 
            3px 3px 0 #000,
            0 0 40px var(--accent-glow),
            0 0 80px rgba(229, 229, 229, 0.15);
    }
    50% { 
        text-shadow: 
            3px 3px 0 #000,
            0 0 60px var(--accent-glow),
            0 0 120px rgba(229, 229, 229, 0.25);
    }
}

/* BREAKDOWN */
.st-timer-breakdown {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    flex-shrink: 0;
}

.st-timer-unit {
    text-align: center;
    padding: 18px 8px;
    position: relative;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-primary) 100%);
}

.st-timer-unit:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 0;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--border-default), transparent);
}

.st-timer-unit-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 6px;
    text-shadow: 2px 2px 0 #000, 0 0 15px var(--accent-glow);
    transition: all 0.3s ease;
}

.st-timer-unit-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 600;
}

/* ACHIEVEMENT CARD */
.st-timer-achievement {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(42, 42, 42, 0.8) 0%, rgba(20, 20, 20, 0.9) 100%);
    border: 2px solid var(--border-strong);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.st-timer-achievement::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.st-timer-achievement:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.st-timer-achievement-icon {
    width: 56px;
    height: 56px;
    background: var(--metal);
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
    box-shadow: 0 0 15px var(--accent-glow);
    position: relative;
    z-index: 2;
}

.st-timer-achievement-info { 
    flex: 1; 
    min-width: 0;
    position: relative;
    z-index: 2;
}

.st-timer-achievement-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
    text-shadow: 0 0 10px var(--accent-glow);
}

.st-timer-achievement-desc {
    font-family: var(--font-main);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* TIP CARD */
.st-timer-tip {
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-primary) 100%);
    border: 2px solid var(--border-default);
    border-left: 4px solid var(--accent);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.st-timer-tip::before {
    content: '"';
    position: absolute;
    top: 8px;
    left: 16px;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
}

.st-timer-tip-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    font-weight: 600;
}

.st-timer-tip-label .st-icon {
    filter: drop-shadow(0 0 6px var(--accent-glow));
}

.st-timer-tip-text {
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    transition: opacity 0.3s ease;
    padding-left: 8px;
    border-left: 2px solid var(--border-default);
}

/* RESET BUTTON */
.st-timer-actions { 
    margin-top: auto;
    flex-shrink: 0;
    padding-top: 20px;
}

.st-timer-reset-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--metal) 0%, var(--bg-card) 100%);
    border: 2px solid var(--danger);
    color: var(--danger);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    position: relative;
    overflow: hidden;
}

.st-timer-reset-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.st-timer-reset-btn:hover::before { transform: translateX(100%); }

.st-timer-reset-btn:hover {
    background: var(--danger);
    color: #FFF;
    box-shadow: 0 0 40px var(--danger-glow), 0 8px 25px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.st-timer-reset-btn:active { transform: scale(0.97); }

.st-timer-reset-btn .st-icon { transition: transform 0.3s ease; }
.st-timer-reset-btn:hover .st-icon { transform: rotate(180deg); }

/* EMPTY STATE */
.st-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
    min-height: 50vh;
}

.st-empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-card);
    border: 2px solid var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--danger);
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
    box-shadow: 0 0 20px var(--danger-glow);
}

.st-empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: 0.1em;
}

.st-empty-state p {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ANIMAÇÕES */
.st-timer-container > * {
    animation: timerFadeUp 0.5s var(--ease-out) both;
}

.st-timer-header { animation-delay: 0s; }
.st-timer-main { animation-delay: 0.1s; }
.st-timer-breakdown { animation-delay: 0.2s; }
.st-timer-achievement { animation-delay: 0.3s; }
.st-timer-tip { animation-delay: 0.4s; }
.st-timer-actions { animation-delay: 0.5s; }

@keyframes timerFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* RESPONSIVO */
@media (max-width: 380px) {
    .st-timer-display { font-size: clamp(2.8rem, 15vw, 4rem); }
    .st-timer-unit-value { font-size: 1.8rem; }
    .st-timer-unit { padding: 14px 6px; }
    .st-timer-achievement { padding: 16px; gap: 12px; }
    .st-timer-achievement-icon { width: 48px; height: 48px; }
    .st-timer-achievement-title { font-size: 1rem; }
    .st-timer-reset-btn { padding: 16px; font-size: 1rem; }
}

@media (min-width: 600px) {
    .st-timer-scroll-content { padding: 28px; }
    .st-timer-main { padding: 40px 0; }
    .st-timer-unit { padding: 24px 12px; }
    .st-timer-unit-value { font-size: 2.8rem; }
}