/* ============================================================
   Fullscreen Countdown Timer — countdown.css
   ByteHUB devs
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Share+Tech+Mono&display=swap');

/* ── Wrapper ── */
.fcd-wrapper {
    font-family: 'Orbitron', monospace;
    position: relative;
}

/* ══════════════════════════════════════
   SETUP PANEL
══════════════════════════════════════ */
.fcd-setup {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    background: #0a0a0f;
    border-radius: 12px;
    padding: 40px 20px;
}

.fcd-setup-box {
    background: #12121a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.fcd-setup-box h2 {
    color: #fff;
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 32px;
    font-weight: 700;
}

.fcd-setup-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 28px;
}

.fcd-setup-row label {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.fcd-minutes-input {
    background: #1e1e2e;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    width: 110px;
    padding: 10px 8px;
    outline: none;
    transition: border-color 0.2s;
}
.fcd-minutes-input:focus {
    border-color: rgba(255,255,255,0.4);
}
.fcd-minutes-input::-webkit-inner-spin-button,
.fcd-minutes-input::-webkit-outer-spin-button { opacity: 1; }

/* Color pickers row */
.fcd-setup-colors {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.fcd-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fcd-color-item label {
    color: rgba(255,255,255,0.45);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fcd-color-item input[type="color"] {
    width: 52px;
    height: 52px;
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    cursor: pointer;
    padding: 2px;
    background: transparent;
    transition: transform 0.2s, border-color 0.2s;
}
.fcd-color-item input[type="color"]:hover {
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.4);
}

/* Start button */
.fcd-btn-start {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    padding: 16px 48px;
    text-transform: uppercase;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 24px rgba(34, 197, 94, 0.4);
}
.fcd-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.5);
}
.fcd-btn-start:active { transform: translateY(0); }

/* ══════════════════════════════════════
   FULLSCREEN TIMER SCREEN
══════════════════════════════════════ */
.fcd-screen {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: none;
}

.fcd-screen.fcd-active {
    display: flex;
}

/* Animated radial pulse in background */
.fcd-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
    animation: fcd-pulse-bg 4s ease-in-out infinite;
}

@keyframes fcd-pulse-bg {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.15); }
}

/* Time display */
.fcd-time-display {
    position: relative;
    z-index: 2;
    text-align: center;
}

.fcd-time {
    display: block;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    color: rgba(255,255,255,0.95);
    line-height: 1;
    font-size: clamp(80px, 22vw, 280px);
    letter-spacing: -0.02em;
    text-shadow:
        0 0 60px rgba(255,255,255,0.25),
        0 0 120px rgba(255,255,255,0.12),
        0 4px 40px rgba(0,0,0,0.4);
    transition: transform 0.1s;
    user-select: none;
}

/* Tick animation */
.fcd-time.fcd-tick {
    animation: fcd-tick-anim 0.12s ease-out;
}
@keyframes fcd-tick-anim {
    0%   { transform: scale(1.015); }
    100% { transform: scale(1); }
}

/* Pulse when transitioning color */
.fcd-screen.fcd-color-change::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.12);
    animation: fcd-flash 0.5s ease-out forwards;
    pointer-events: none;
    z-index: 1;
}
@keyframes fcd-flash {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* Urgency flash when < 10% left */
.fcd-screen.fcd-urgent .fcd-time {
    animation: fcd-urgent-pulse 1s ease-in-out infinite;
}
@keyframes fcd-urgent-pulse {
    0%, 100% { opacity: 1;    transform: scale(1); }
    50%       { opacity: 0.75; transform: scale(0.99); }
}

/* ── Controls (appear on hover) ── */
.fcd-controls {
    position: fixed;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
}

.fcd-screen:hover .fcd-controls,
.fcd-screen.fcd-paused .fcd-controls {
    opacity: 1;
    cursor: default;
}

.fcd-controls button {
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 1.4rem;
    width: 60px;
    height: 60px;
    transition: background 0.2s, transform 0.15s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fcd-controls button:hover {
    background: rgba(0,0,0,0.55);
    transform: scale(1.1);
}

/* Paused overlay */
.fcd-screen.fcd-paused::after {
    content: 'PAUSADO';
    position: fixed;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 100px;
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    padding: 8px 24px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    z-index: 10;
}

/* ── FINISHED message ── */
.fcd-finished-msg {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: clamp(60px, 14vw, 200px);
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.06em;
    text-shadow:
        0 0 80px rgba(255,255,255,0.4),
        0 0 160px rgba(255,255,255,0.2);
    animation: fcd-finished-appear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    z-index: 5;
}
.fcd-finished-msg.fcd-show {
    display: flex;
}
@keyframes fcd-finished-appear {
    0%   { opacity: 0; transform: scale(0.6); }
    100% { opacity: 1; transform: scale(1); }
}

/* Confetti / rings on finish */
.fcd-screen.fcd-done::before {
    animation: fcd-done-ring 1.2s ease-out infinite !important;
}
@keyframes fcd-done-ring {
    0%   { opacity: 0.8; transform: scale(0.8); }
    50%  { opacity: 0.3; transform: scale(1.3); }
    100% { opacity: 0.8; transform: scale(0.8); }
}

/* ── Responsive tweaks ── */
@media (max-width: 600px) {
    .fcd-setup-box { padding: 28px 24px; }
    .fcd-setup-colors { gap: 16px; }
    .fcd-controls button { width: 50px; height: 50px; font-size: 1.1rem; }
}
