/* Event Countdown Timer Styles */
.ect-countdown-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    background: transparent;
    position: relative;
    overflow: visible;
    font-family: 'Arial', sans-serif;
}

.ect-title {
    position: relative;
    z-index: 2;
    margin-bottom: 40px;
}

.ect-title h2 {
    color: #1e3c72;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(30, 60, 114, 0.3);
    letter-spacing: 1px;
}

.ect-countdown-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.ect-time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.ect-time-box {
    position: relative;
    width: 120px;
    height: 120px;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.ect-time-box:hover {
    transform: rotateY(10deg) rotateX(5deg) scale(1.05);
}

.ect-time-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    box-shadow: 
        0 0 0 4px rgba(30, 60, 114, 0.2),
        0 15px 30px rgba(30, 60, 114, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        inset 0 -2px 0 rgba(30, 60, 114, 0.2);
    border: 2px solid rgba(30, 60, 114, 0.3);
}

.ect-time-front {
    background: linear-gradient(145deg, 
        rgba(61, 90, 161, 0.95), 
        rgba(42, 68, 128, 0.95), 
        rgba(30, 60, 114, 0.95));
}

.ect-time-back {
    background: linear-gradient(145deg, 
        rgba(42, 68, 128, 0.95), 
        rgba(30, 51, 102, 0.95));
    transform: rotateY(180deg);
}

.ect-time-number {
    font-size: 2.8rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    font-family: 'Arial', monospace;
    letter-spacing: -2px;
}

.ect-time-label {
    font-size: 1.1rem;
    color: #1e3c72;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(30, 60, 114, 0.2);
}

/* Flip animation */
.ect-flip .ect-time-front {
    animation: flipToBack 0.6s ease-in-out;
}

.ect-flip .ect-time-back {
    animation: flipToFront 0.6s ease-in-out;
}

@keyframes flipToBack {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(-180deg); }
}

@keyframes flipToFront {
    0% { transform: rotateY(180deg); }
    100% { transform: rotateY(0deg); }
}

/* Enhanced 3D Circle Glow effect */
.ect-time-box::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        transparent 30%, 
        rgba(30, 60, 114, 0.1) 40%, 
        transparent 70%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ect-time-box:hover::before {
    opacity: 1;
    animation: circleGlow 2s ease-in-out infinite alternate;
}

@keyframes circleGlow {
    0% { 
        box-shadow: 0 0 20px rgba(30, 60, 114, 0.3);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 0 40px rgba(30, 60, 114, 0.6);
        transform: scale(1.1);
    }
}

/* Pulsing ring effect for active countdown */
.ect-time-box::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid rgba(30, 60, 114, 0.3);
    z-index: -1;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0% { 
        transform: scale(1);
        opacity: 1;
        border-color: rgba(30, 60, 114, 0.3);
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.7;
        border-color: rgba(30, 60, 114, 0.6);
    }
    100% { 
        transform: scale(1);
        opacity: 1;
        border-color: rgba(30, 60, 114, 0.3);
    }
}

/* Expired state */
.ect-expired {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, 
        rgba(211, 47, 47, 0.9), 
        rgba(244, 67, 54, 0.9));
    border-radius: 50px;
    color: white;
    box-shadow: 0 10px 20px rgba(211, 47, 47, 0.3);
}

.ect-expired h3 {
    font-size: 2rem;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ect-countdown-container {
        padding: 30px 15px;
    }
    
    .ect-title h2 {
        font-size: 2rem;
    }
    
    .ect-countdown-wrapper {
        gap: 20px;
    }
    
    .ect-time-box {
        width: 100px;
        height: 100px;
    }
    
    .ect-time-number {
        font-size: 2.2rem;
    }
    
    .ect-time-label {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .ect-countdown-container {
        padding: 20px 10px;
    }
    
    .ect-title h2 {
        font-size: 1.6rem;
    }
    
    .ect-countdown-wrapper {
        gap: 15px;
    }
    
    .ect-time-box {
        width: 80px;
        height: 80px;
    }
    
    .ect-time-number {
        font-size: 1.8rem;
    }
    
    .ect-time-label {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}

/* Prevent conflicts with theme styles */
.ect-countdown-container * {
    box-sizing: border-box;
}

.ect-countdown-container h2,
.ect-countdown-container span,
.ect-countdown-container div {
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    font-family: inherit;
}

/* Animation for number changes */
.ect-number-change {
    animation: numberPulse 0.3s ease-in-out;
}

@keyframes numberPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); color: #FFD700; }
    100% { transform: scale(1); }
}

/* Smooth entrance animation */
.ect-countdown-container {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Individual circle entrance animations */
.ect-time-unit:nth-child(1) { animation-delay: 0.1s; }
.ect-time-unit:nth-child(2) { animation-delay: 0.2s; }
.ect-time-unit:nth-child(3) { animation-delay: 0.3s; }
.ect-time-unit:nth-child(4) { animation-delay: 0.4s; }

.ect-time-unit {
    animation: bounceIn 0.6s ease-out both;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    70% {
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}