/* ===== VARIÁVEIS GLOBAIS ===== */
.l2arts-countdown-container {
    --c-circle: #c5a059;
    --c-circle-bg: transparent;
    --c-circle-bg-opacity: 15;
    --c-glow: #c5a059;
    --c-title: #c5a059;
    --c-subtitle: #ffffff;
    --c-numbers: #ffffff;
    --c-labels: #c5a059;
    
    --font-title: 'Cinzel', serif;
    --font-subtitle: 'Montserrat', sans-serif;
    --font-numbers: 'Cinzel', serif;
    --font-labels: 'Montserrat', sans-serif;
    
    --circle-size: 90px;
    --circle-height: 100px;
    --stroke-width: 6;
    --gap: 1.1rem;
    --value-size: 1.4rem;
    --label-size: 0.65rem;
    --title-size: 1.4rem;
    --subtitle-size: 0.95rem;
    
    --glow-intensity: 10px;
    --glow-spread: 1;
}

/* ===== TAMANHO DOS CÍRCULOS ===== */
.csize-small { --circle-size:60px; --circle-height:70px; }
.csize-medium { --circle-size:90px; --circle-height:100px; }
.csize-large { --circle-size:120px; --circle-height:130px; }
.csize-xlarge { --circle-size:150px; --circle-height:160px; }

/* ===== GROSSURA ===== */
.cstroke-thin { --stroke-width: 3; }
.cstroke-normal { --stroke-width: 6; }
.cstroke-thick { --stroke-width: 9; }
.cstroke-xthick { --stroke-width: 12; }

/* ===== ESPAÇAMENTO ===== */
.cgap-tight .countdown-circles { gap: 0.4rem; }
.cgap-normal .countdown-circles { gap: 1.1rem; }
.cgap-wide .countdown-circles { gap: 2rem; }

/* ===== FONTES - TÍTULO ===== */
.fnt-title-cinzel { --font-title: 'Cinzel', serif; }
.fnt-title-montserrat { --font-title: 'Montserrat', sans-serif; }
.fnt-title-roboto { --font-title: 'Roboto', sans-serif; }
.fnt-title-oswald { --font-title: 'Oswald', sans-serif; }
.fnt-title-raleway { --font-title: 'Raleway', sans-serif; }
.fnt-title-playfair { --font-title: 'Playfair Display', serif; }
.fnt-title-exo2 { --font-title: 'Exo 2', sans-serif; }
.fnt-title-orbitron { --font-title: 'Orbitron', sans-serif; }
.fnt-title-russo { --font-title: 'Russo One', sans-serif; }
.fnt-title-blackops { --font-title: 'Black Ops One', cursive; }
.fnt-title-system { --font-title: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ===== FONTES - SUBTÍTULO ===== */
.fnt-subtitle-montserrat { --font-subtitle: 'Montserrat', sans-serif; }
.fnt-subtitle-roboto { --font-subtitle: 'Roboto', sans-serif; }
.fnt-subtitle-oswald { --font-subtitle: 'Oswald', sans-serif; }
.fnt-subtitle-raleway { --font-subtitle: 'Raleway', sans-serif; }
.fnt-subtitle-cinzel { --font-subtitle: 'Cinzel', serif; }
.fnt-subtitle-system { --font-subtitle: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ===== FONTES - NÚMEROS ===== */
.fnt-numbers-cinzel { --font-numbers: 'Cinzel', serif; }
.fnt-numbers-montserrat { --font-numbers: 'Montserrat', sans-serif; }
.fnt-numbers-roboto { --font-numbers: 'Roboto', sans-serif; }
.fnt-numbers-oswald { --font-numbers: 'Oswald', sans-serif; }
.fnt-numbers-raleway { --font-numbers: 'Raleway', sans-serif; }
.fnt-numbers-exo2 { --font-numbers: 'Exo 2', sans-serif; }
.fnt-numbers-orbitron { --font-numbers: 'Orbitron', sans-serif; }
.fnt-numbers-russo { --font-numbers: 'Russo One', sans-serif; }
.fnt-numbers-blackops { --font-numbers: 'Black Ops One', cursive; }
.fnt-numbers-system { --font-numbers: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ===== FONTES - LABELS ===== */
.fnt-labels-montserrat { --font-labels: 'Montserrat', sans-serif; }
.fnt-labels-roboto { --font-labels: 'Roboto', sans-serif; }
.fnt-labels-oswald { --font-labels: 'Oswald', sans-serif; }
.fnt-labels-raleway { --font-labels: 'Raleway', sans-serif; }
.fnt-labels-cinzel { --font-labels: 'Cinzel', serif; }
.fnt-labels-system { --font-labels: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ===== FONTES LOCAIS INDEPENDENTES ===== */
.has-font-title-local .countdown-title { font-family: 'L2ArtsFontTitle', var(--font-title) !important; }
.has-font-subtitle-local .countdown-subtitle { font-family: 'L2ArtsFontSubtitle', var(--font-subtitle) !important; }
.has-font-numbers-local .count-value { font-family: 'L2ArtsFontNumbers', var(--font-numbers) !important; }
.has-font-labels-local .count-label { font-family: 'L2ArtsFontLabels', var(--font-labels) !important; }

/* ===== TAMANHOS - TÍTULO ===== */
.title-size-small { --title-size: 1rem; }
.title-size-medium { --title-size: 1.4rem; }
.title-size-large { --title-size: 1.8rem; }
.title-size-xlarge { --title-size: 2.4rem; }

/* ===== TAMANHOS - SUBTÍTULO ===== */
.subtitle-size-small { --subtitle-size: 0.75rem; }
.subtitle-size-medium { --subtitle-size: 0.95rem; }
.subtitle-size-large { --subtitle-size: 1.1rem; }
.subtitle-size-xlarge { --subtitle-size: 1.3rem; }

/* ===== TAMANHOS - NÚMEROS ===== */
.numbers-size-small { --value-size: 1rem; }
.numbers-size-medium { --value-size: 1.4rem; }
.numbers-size-large { --value-size: 1.8rem; }
.numbers-size-xlarge { --value-size: 2.2rem; }

/* ===== TAMANHOS - LABELS ===== */
.labels-size-small { --label-size: 0.5rem; }
.labels-size-medium { --label-size: 0.65rem; }
.labels-size-large { --label-size: 0.8rem; }
.labels-size-xlarge { --label-size: 0.9rem; }

/* ===== GLOW INTENSIDADE (0-30px) ===== */
.glow-intensity-0 { --glow-intensity: 0px; }
.glow-intensity-5 { --glow-intensity: 5px; }
.glow-intensity-10 { --glow-intensity: 10px; }
.glow-intensity-15 { --glow-intensity: 15px; }
.glow-intensity-20 { --glow-intensity: 20px; }
.glow-intensity-25 { --glow-intensity: 25px; }
.glow-intensity-30 { --glow-intensity: 30px; }

/* ===== GLOW SPREAD ===== */
.glow-spread-tight { --glow-spread: 0.5; }
.glow-spread-normal { --glow-spread: 1; }
.glow-spread-wide { --glow-spread: 1.5; }
.glow-spread-xwide { --glow-spread: 2; }

/* ===== CONTAINER BASE ===== */
.l2arts-countdown-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem auto;
    padding: 0 16px;
    box-sizing: border-box;
    max-width: 100%;
}

/* ===== TÍTULO ===== */
.countdown-title {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: clamp(1rem, var(--title-size), 2.4rem);
    color: var(--c-title);
    text-align: center;
    margin-bottom: 0.3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* ===== SUBTÍTULO ===== */
.countdown-subtitle {
    font-family: var(--font-subtitle);
    font-size: clamp(0.75rem, var(--subtitle-size), 1.3rem);
    color: var(--c-subtitle);
    opacity: 0.9;
    text-align: center;
    margin-bottom: 1.2rem;
    font-weight: 400;
    line-height: 1.3;
}

.countdown-circles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    gap: var(--gap);
}

/* ===== CÍRCULO RING ===== */
.countdown-circle {
    position: relative;
    width: var(--circle-size);
    height: var(--circle-height);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===== BACKGROUND DO CÍRCULO (CORRIGIDO) ===== */
.countdown-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88%;
    height: 88%;
    border-radius: 50%;
    background-color: var(--c-circle-bg);
    opacity: calc(var(--c-circle-bg-opacity) / 100);
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.countdown-circle:hover::before {
    opacity: calc((var(--c-circle-bg-opacity) + 5) / 100);
}

/* SVG */
.countdown-circle svg.ring-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    transform: rotate(-90deg);
    overflow: visible;
    z-index: 1;
}

.countdown-circle .ring-track {
    fill: none;
    stroke: color-mix(in srgb, var(--c-circle) 15%, transparent);
    stroke-width: var(--stroke-width);
    stroke-linecap: round;
}

.countdown-circle .ring-progress {
    fill: none;
    stroke: var(--c-circle);
    stroke-width: var(--stroke-width);
    stroke-linecap: round;
    stroke-dasharray: 276.46;
    stroke-dashoffset: 276.46;
    transition: stroke-dashoffset 0.8s ease-out;
}

/* Glow */
.glow-enabled .countdown-circle .ring-progress {
    filter: drop-shadow(0 0 calc(var(--glow-intensity) * var(--glow-spread)) var(--c-glow));
    transition: stroke-dashoffset 0.8s ease, filter 0.3s ease;
}
.glow-enabled .countdown-circle:hover .ring-progress {
    filter: drop-shadow(0 0 calc(var(--glow-intensity) * var(--glow-spread) * 1.3) var(--c-glow));
}

/* Conteúdo */
.count-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.count-value {
    font-family: var(--font-numbers);
    font-size: var(--value-size);
    font-weight: 700;
    color: var(--c-numbers);
    line-height: 1;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.count-label {
    font-family: var(--font-labels);
    font-size: var(--label-size);
    font-weight: 600;
    color: var(--c-labels);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 4px;
    opacity: 0.95;
}
.count-label.label-above {
    margin-top: 0;
    margin-bottom: 4px;
    order: -1;
}

/* ===== EFEITOS ===== */
.ceffect-none .ring-progress { transition: none; }
.ceffect-pulse .countdown-circle { animation: pulse 2.5s ease-in-out infinite; }
.ceffect-pulse .ring-progress { animation: pulse-glow 2.5s ease-in-out infinite; }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.02)} }
@keyframes pulse-glow { 
    0%,100% { filter: drop-shadow(0 0 calc(var(--glow-intensity) * 0.3 * var(--glow-spread)) var(--c-glow)); }
    50% { filter: drop-shadow(0 0 calc(var(--glow-intensity) * var(--glow-spread)) var(--c-glow)); }
}
.ceffect-gradient .ring-progress { stroke: url(#grad); }
.ceffect-gradient svg { overflow: visible; }

/* ===== LABELS ===== */
.label-hidden .count-label { display: none !important; }

/* ===== RESPONSIVO ===== */
@media (max-width: 767px) {
    .l2arts-countdown-container {
        --circle-size: 68px !important;
        --circle-height: 78px !important;
        --stroke-width: 4 !important;
        --value-size: 1rem !important;
        --label-size: 0.52rem !important;
        --title-size: 1.2rem !important;
        --subtitle-size: 0.85rem !important;
        --glow-intensity: 6px !important;
        --c-circle-bg-opacity: calc(var(--c-circle-bg-opacity) * 0.7) !important;
    }
    .csize-large, .csize-xlarge { --circle-size: 76px !important; --value-size: 1.1rem !important; }
    .numbers-size-large, .numbers-size-xlarge { --value-size: 1.1rem !important; }
    .countdown-circles { gap: 0.5rem !important; max-width: 340px; }
    .countdown-title { font-size: var(--title-size) !important; margin-bottom: 0.2rem; }
    .countdown-subtitle { font-size: var(--subtitle-size) !important; margin-bottom: 0.9rem; }
    .ceffect-pulse .countdown-circle, .ceffect-pulse .ring-progress { animation: none !important; }
}

@media (max-width: 359px) {
    .l2arts-countdown-container {
        --circle-size: 56px !important;
        --circle-height: 66px !important;
        --value-size: 0.9rem !important;
        --label-size: 0.48rem !important;
        --title-size: 1.1rem !important;
        --subtitle-size: 0.8rem !important;
        --glow-intensity: 4px !important;
        --c-circle-bg-opacity: calc(var(--c-circle-bg-opacity) * 0.5) !important;
    }
    .countdown-circles { gap: 0.3rem !important; max-width: 290px; }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
    .ring-progress, .countdown-circle { transition: none !important; animation: none !important; }
    .glow-enabled .ring-progress { filter: none !important; }
    .countdown-circle::before { transition: none !important; }
}