/* Visitor Counter Styles - Redesigned */
.visitor-counter-container {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(0, 245, 255, 0.08) 50%, 
        rgba(255, 107, 107, 0.05) 100%
    );
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 20px;
    padding: 25px 30px;
    margin: 30px 0;
    backdrop-filter: blur(15px);
    box-shadow: 
        0 8px 32px rgba(0, 245, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 0 1px rgba(0, 245, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: translateY(0);
}

.visitor-counter-container:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 45px rgba(0, 245, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 2px rgba(0, 245, 255, 0.3);
}

.visitor-counter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 245, 255, 0.1),
        transparent
    );
    transition: left 0.8s ease;
}

.visitor-counter-container:hover::before {
    left: 100%;
}

.counter-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
    position: relative;
}

.counter-title i {
    font-size: 24px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.6));
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from {
        filter: drop-shadow(0 0 8px rgba(0, 245, 255, 0.4));
        transform: scale(1);
    }
    to {
        filter: drop-shadow(0 0 15px rgba(0, 245, 255, 0.8));
        transform: scale(1.05);
    }
}

.counter-title span {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.counter-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.counter-stat {
    text-align: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(0, 245, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.counter-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.counter-stat:hover::before {
    transform: translateX(100%);
}

.counter-stat:hover {
    background: rgba(0, 245, 255, 0.1);
    border-color: rgba(0, 245, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 245, 255, 0.2);
}

.counter-number {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 8px;
    line-height: 1;
    text-shadow: 0 0 10px rgba(0, 245, 255, 0.5);
    transition: all 0.3s ease;
}

.counter-stat:hover .counter-number {
    font-size: 30px;
    text-shadow: 0 0 15px rgba(0, 245, 255, 0.8);
}

.counter-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.counter-label i {
    font-size: 16px;
    color: var(--accent-primary);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.counter-stat:hover .counter-label {
    color: var(--accent-primary);
    opacity: 1;
}

.counter-stat:hover .counter-label i {
    opacity: 1;
    transform: scale(1.1);
}

.counter-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.counter-updated {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
    opacity: 0.7;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.counter-updated::before {
    content: '⏱';
    font-size: 14px;
    opacity: 0.6;
}

/* Loading state */
.visitor-counter-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.visitor-counter-container.loading .counter-number {
    animation: number-loading 1.5s ease-in-out infinite;
}

@keyframes number-loading {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .visitor-counter-container {
        padding: 20px;
        margin: 20px 0;
        border-radius: 15px;
    }
    
    .counter-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .counter-stat {
        padding: 15px 12px;
    }
    
    .counter-number {
        font-size: 24px;
    }
    
    .counter-stat:hover .counter-number {
        font-size: 26px;
    }
    
    .counter-title span {
        font-size: 16px;
    }
    
    .counter-title i {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .visitor-counter-container {
        padding: 15px;
        margin: 15px 0;
        border-radius: 12px;
    }
    
    .counter-title {
        margin-bottom: 20px;
        padding-bottom: 12px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .counter-title i {
        font-size: 28px;
    }
    
    .counter-title span {
        font-size: 14px;
    }
    
    .counter-number {
        font-size: 22px;
    }
    
    .counter-label {
        font-size: 12px;
        gap: 2px;
    }
    
    .counter-label i {
        font-size: 14px;
    }
    
    .counter-stats {
        gap: 12px;
    }
    
    .counter-stat {
        padding: 12px 10px;
    }
}

/* Dark/Light theme specific adjustments */
[data-theme="light"] .visitor-counter-container {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(0, 112, 243, 0.1) 50%, 
        rgba(245, 101, 101, 0.08) 100%
    );
    box-shadow: 
        0 8px 32px rgba(0, 112, 243, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(0, 112, 243, 0.2);
    border-color: rgba(0, 112, 243, 0.2);
}

[data-theme="light"] .visitor-counter-container:hover {
    box-shadow: 
        0 15px 45px rgba(0, 112, 243, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 2px rgba(0, 112, 243, 0.3);
}

[data-theme="light"] .counter-stat {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 112, 243, 0.15);
}

[data-theme="light"] .counter-stat:hover {
    background: rgba(0, 112, 243, 0.1);
    border-color: rgba(0, 112, 243, 0.3);
}

/* Animation for when counter updates */
.counter-updating .counter-number {
    animation: counter-update 0.6s ease-out;
}

@keyframes counter-update {
    0% {
        transform: scale(1);
        color: var(--accent-primary);
    }
    50% {
        transform: scale(1.1);
        color: var(--accent-secondary);
        text-shadow: 0 0 20px currentColor;
    }
    100% {
        transform: scale(1);
        color: var(--accent-primary);
    }
}
