/* ===================================================
   Countdown Timer Pro — Frontend Styles
   =================================================== */

/* --- Базові стилі --- */
.ctp-wrapper {
    display: inline-block;
    width: 100%;
    max-width: 600px;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 10px;
    font-family: 'Segoe UI', Arial, sans-serif;
    text-align: center;
    margin: 20px auto;
}

.ctp-title {
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 14px;
}

.ctp-blocks {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ctp-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.ctp-number {
    display: block;
    font-size: 2.8em;
    font-weight: 700;
    line-height: 1.1;
    border-radius: 8px;
    padding: 8px 14px;
    min-width: 60px;
    text-align: center;
    transition: all 0.3s ease;
}

.ctp-label {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 5px;
}

.ctp-separator {
    font-size: 2.2em;
    font-weight: 700;
    padding-bottom: 20px;
    line-height: 1;
    align-self: flex-start;
    padding-top: 14px;
}

.ctp-expired-msg {
    margin-top: 14px;
    font-size: 1.1em;
    font-weight: 600;
}

.ctp-error {
    color: #c00;
    font-style: italic;
}

/* ===================================================
   ТЕМА: classic
   =================================================== */
.ctp-theme-classic {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.35);
}

.ctp-theme-classic .ctp-title {
    color: #e8f0fe;
}

.ctp-theme-classic .ctp-number {
    background: rgba(255,255,255,0.18);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.15);
}

.ctp-theme-classic .ctp-label {
    color: #c5d8ff;
}

.ctp-theme-classic .ctp-separator {
    color: rgba(255,255,255,0.5);
}

.ctp-theme-classic .ctp-expired-msg {
    color: #ffd54f;
}

/* ===================================================
   ТЕМА: dark
   =================================================== */
.ctp-theme-dark {
    background: linear-gradient(135deg, #1c1c2e 0%, #16213e 100%);
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #2a2a4a;
}

.ctp-theme-dark .ctp-title {
    color: #a0b4d0;
}

.ctp-theme-dark .ctp-number {
    background: #0f3460;
    color: #e0e0e0;
    border: 2px solid #1a508b;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

.ctp-theme-dark .ctp-label {
    color: #6a7f9a;
}

.ctp-theme-dark .ctp-separator {
    color: #2a4070;
}

.ctp-theme-dark .ctp-expired-msg {
    color: #ef5350;
}

/* ===================================================
   ТЕМА: neon
   =================================================== */
.ctp-theme-neon {
    background: #0a0a0a;
    color: #00ff9f;
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.25), 0 0 40px rgba(0, 255, 159, 0.1);
    border: 1px solid #00ff9f44;
    border-radius: 12px;
}

.ctp-theme-neon .ctp-title {
    color: #00e5ff;
    text-shadow: 0 0 8px #00e5ff;
}

.ctp-theme-neon .ctp-number {
    background: #0d0d0d;
    color: #00ff9f;
    border: 2px solid #00ff9f;
    box-shadow: 0 0 12px rgba(0, 255, 159, 0.5), inset 0 0 8px rgba(0, 255, 159, 0.1);
    text-shadow: 0 0 10px #00ff9f;
}

.ctp-theme-neon .ctp-label {
    color: #00e5ff88;
}

.ctp-theme-neon .ctp-separator {
    color: #00ff9f55;
    text-shadow: 0 0 8px #00ff9f;
}

.ctp-theme-neon .ctp-expired-msg {
    color: #ff4081;
    text-shadow: 0 0 8px #ff4081;
}

/* ===================================================
   ТЕМА: minimal
   =================================================== */
.ctp-theme-minimal {
    background: #ffffff;
    color: #333;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.ctp-theme-minimal .ctp-title {
    color: #555;
    font-weight: 500;
}

.ctp-theme-minimal .ctp-number {
    background: #f5f5f5;
    color: #222;
    border: 2px solid #ddd;
    font-weight: 800;
}

.ctp-theme-minimal .ctp-label {
    color: #999;
    font-weight: 400;
}

.ctp-theme-minimal .ctp-separator {
    color: #ccc;
}

.ctp-theme-minimal .ctp-expired-msg {
    color: #e53935;
}

/* ===================================================
   ТЕМА: fire
   =================================================== */
.ctp-theme-fire {
    background: linear-gradient(135deg, #1a0000 0%, #3d0000 50%, #1a0000 100%);
    color: #ffcc00;
    box-shadow: 0 4px 30px rgba(255, 80, 0, 0.4);
    border: 1px solid #ff6600;
    position: relative;
    overflow: hidden;
}

.ctp-theme-fire::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at bottom, rgba(255,80,0,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.ctp-theme-fire .ctp-title {
    color: #ffd54f;
    text-shadow: 0 0 8px rgba(255,160,0,0.6);
}

.ctp-theme-fire .ctp-number {
    background: linear-gradient(180deg, #ff6600 0%, #cc2200 100%);
    color: #fff;
    border: 2px solid #ff4400;
    box-shadow: 0 0 14px rgba(255, 80, 0, 0.6), inset 0 1px 4px rgba(255,220,0,0.3);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ctp-theme-fire .ctp-label {
    color: #ff8c00;
}

.ctp-theme-fire .ctp-separator {
    color: #ff4400;
    text-shadow: 0 0 6px #ff4400;
}

.ctp-theme-fire .ctp-expired-msg {
    color: #ff4081;
    text-shadow: 0 0 6px #ff4081;
}

/* ===================================================
   АДАПТИВНІСТЬ
   =================================================== */
@media (max-width: 480px) {
    .ctp-wrapper {
        padding: 14px 8px;
    }

    .ctp-number {
        font-size: 1.9em;
        padding: 6px 8px;
        min-width: 44px;
    }

    .ctp-block {
        min-width: 50px;
    }

    .ctp-separator {
        font-size: 1.6em;
        padding-top: 10px;
    }

    .ctp-label {
        font-size: 0.62em;
    }

    .ctp-title {
        font-size: 1em;
    }
}

@media (max-width: 320px) {
    .ctp-number {
        font-size: 1.5em;
        padding: 4px 6px;
        min-width: 36px;
    }

    .ctp-separator {
        font-size: 1.3em;
    }
}

/* Анімація оновлення числа */
@keyframes ctp-flip {
    0%   { transform: translateY(-4px); opacity: 0.5; }
    100% { transform: translateY(0);    opacity: 1; }
}

.ctp-number.ctp-updated {
    animation: ctp-flip 0.25s ease;
}