/* Elegant Countdown — Public Styles */

.ect-wrap {
    font-family: var(--ect-font, 'Playfair Display', serif);
    background: var(--ect-bg, #0a0a1a);
    color: var(--ect-text, #ffffff);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 700px;
    margin: 20px auto;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
}

/* Decorative background texture */
.ect-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 80%, rgba(255,255,255,.04) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(255,255,255,.03) 0%, transparent 50%);
    pointer-events: none;
}

.ect-wrap::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--ect-accent, #c9a96e), transparent);
}

/* Text top & bottom */
.ect-text-top,
.ect-text-bottom {
    font-family: var(--ect-font, 'Playfair Display', serif);
    font-size: clamp(.85rem, 2.5vw, 1.1rem);
    color: var(--ect-text);
    opacity: .75;
    letter-spacing: .06em;
    line-height: 1.5;
    padding: 0 10px;
}

.ect-text-top {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-style: italic;
}

.ect-text-bottom {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
    font-style: italic;
}

/* Title */
.ect-title {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 700;
    color: var(--ect-accent, #c9a96e);
    letter-spacing: .08em;
    margin-bottom: 6px;
    text-transform: uppercase;
    opacity: .9;
}

/* Mode badge */
.ect-mode-badge {
    font-size: 11px;
    font-family: -apple-system, sans-serif;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ect-text);
    opacity: .45;
    margin-bottom: 28px;
}

/* Units row */
.ect-units {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

/* Separator */
.ect-sep {
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 400;
    color: var(--ect-accent);
    opacity: .5;
    padding: 0 4px;
    line-height: 1;
    margin-top: 8px;
}

/* Single unit block */
.ect-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    padding: 0 8px;
}

/* Number container */
.ect-number {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 14px 10px 10px;
    min-width: 88px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Inner shine */
.ect-number::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: rgba(255,255,255,.03);
    border-radius: 12px 12px 0 0;
}

/* The value */
.ect-val {
    display: block;
    font-size: clamp(2.2rem, 7vw, 4rem);
    font-weight: 900;
    line-height: 1;
    color: var(--ect-text);
    letter-spacing: -.02em;
    transition: transform .15s ease, color .15s ease;
    position: relative;
    z-index: 1;
}

.ect-val.ect-flip {
    transform: scaleY(0.85);
    color: var(--ect-accent);
}

/* Label */
.ect-label {
    font-size: clamp(.6rem, 1.5vw, .75rem);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ect-text);
    opacity: .5;
    margin-top: 10px;
    font-weight: 600;
}

/* Completed message */
.ect-completed-msg {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--ect-accent);
    padding: 20px;
    letter-spacing: .05em;
    animation: ect-pulse 2s ease-in-out infinite;
}

@keyframes ect-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}

/* Entrance animation */
.ect-wrap {
    animation: ect-fadein .8s ease both;
}

@keyframes ect-fadein {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ect-unit {
    animation: ect-fadein .6s ease both;
}
.ect-unit:nth-child(1)  { animation-delay: .1s; }
.ect-unit:nth-child(3)  { animation-delay: .2s; }
.ect-unit:nth-child(5)  { animation-delay: .3s; }
.ect-unit:nth-child(7)  { animation-delay: .4s; }

/* Responsive */
@media (max-width: 480px) {
    .ect-wrap { padding: 28px 16px; }
    .ect-unit { min-width: 70px; padding: 0 4px; }
    .ect-number { min-width: 66px; padding: 10px 6px 8px; }
    .ect-sep { padding: 0 2px; }
}
