/* === Таймер з 3D ефектом і глянцем === */
.custom-timer {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.6), 
        0 8px 16px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.1),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

/* Глянцевий блиск зверху */
.custom-timer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 50%;
    width: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.12), rgba(255,255,255,0));
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    pointer-events: none;
    z-index: 1;
}

.custom-timer:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.8), 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Контейнер цифр і двокрапок */
.custom-timer .timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* Плитки з різними кольорами та світінням */
.custom-timer .timer div:not(.colon) {
    background: linear-gradient(145deg, #ff5722, #f44336);
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow:
        0 0 15px rgba(255, 87, 34, 0.7), /* Світіння для червоних */
        inset 2px 2px 4px rgba(255, 255, 255, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.2),
        4px 4px 10px rgba(0, 0, 0, 0.5);
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 60px;
}

/* Варіації кольорів плиток */
.custom-timer .timer div:nth-child(1):not(.colon) {
    background: linear-gradient(145deg, #ff9800, #f57c00);
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.7);
}
.custom-timer .timer div:nth-child(2):not(.colon) {
    background: linear-gradient(145deg, #ffeb3b, #fbc02d);
    box-shadow: 0 0 15px rgba(255, 235, 59, 0.7);
}
.custom-timer .timer div:nth-child(3):not(.colon) {
    background: linear-gradient(145deg, #4caf50, #388e3c);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
}
.custom-timer .timer div:nth-child(4):not(.colon) {
    background: linear-gradient(145deg, #2196f3, #1976d2);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.7);
}
.custom-timer .timer div:nth-child(5):not(.colon) {
    background: linear-gradient(145deg, #9c27b0, #7b1fa2);
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.7);
}
.custom-timer .timer div:nth-child(6):not(.colon) {
    background: linear-gradient(145deg, #ff5722, #f44336);
    box-shadow: 0 0 15px rgba(255, 87, 34, 0.7);
}

/* Двокрапки між плитками */
.custom-timer .colon {
    font-size: 32px;
    color: #fff;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Цифри */
.custom-timer .timer .number {
    font-size: 36px;
    font-weight: bold;
    text-shadow: 
        1px 1px 1px rgba(0, 0, 0, 0.3),
        2px 2px 2px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(255, 215, 0, 0.7); /* Світіння */
    line-height: 1;
}

/* Анімація для зміни кольору годин, хвилин та секунд */
@keyframes numberColorChange {
    0%   { color: #ffffff; }
    6%   { color: #f44336; }
    12%  { color: #ff9800; }
    18%  { color: #ffeb3b; }
    24%  { color: #4caf50; }
    30%  { color: #2196f3; }
    36%  { color: #9c27b0; }
    42%  { color: #ff5722; }
    48%  { color: #8bc34a; }
    54%  { color: #607d8b; }
    60%  { color: #795548; }
    66%  { color: #c2185b; }
    72%  { color: #7b1fa2; }
    78%  { color: #e91e63; }
    84%  { color: #3f51b5; }
    90%  { color: #009688; }
    100% { color: #ffffff; }
}

/* Пульсація чи масштабування лише для секунд */
@keyframes bounceScale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Пульсація та зміна кольору для секунд, хвилин та годин */
.custom-timer .timer #seconds, 
.custom-timer .timer #minutes,
.custom-timer .timer #hours {
    animation: numberColorChange 15s infinite, bounceScale 1s infinite;
}

/* Підписи */
.custom-timer .timer .label {
    font-size: 12px;
    margin-top: 2px;
    color: rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}
