/* ========================================
   ESTILOS PREMIUM ADICIONAIS
   Melhorias visuais e animações avançadas
======================================== */

/* Efeito de Partículas no Background */
body {
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, hsl(142 72% 42% / 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, hsl(175 60% 35% / 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, hsl(142 72% 42% / 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Melhoria nos Cards */
.bg-card {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Botões com Efeito Magnetic */
button,
.inline-flex {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active,
.inline-flex:active {
    transform: scale(0.96) !important;
}

/* Header com Glassmorphism */
header {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(0, 0, 0, 0.7) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Melhoria no Container do Vídeo */
.shadow-elevated {
    position: relative;
}

.shadow-elevated::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, hsl(142 72% 42% / 0.1) 0%, transparent 70%);
    z-index: -1;
    filter: blur(60px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.shadow-elevated:hover::after {
    opacity: 1;
}

/* Efeito de Typing nos Títulos */
@keyframes typing-cursor {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.typing-effect::after {
    content: '|';
    animation: typing-cursor 1s infinite;
    color: hsl(142 72% 42%);
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        hsl(142 72% 42%) var(--scroll-progress, 0%), 
        transparent var(--scroll-progress, 0%)
    );
    z-index: 9999;
}

/* Improved Text Selection */
::selection {
    background-color: hsl(142 72% 42% / 0.3);
    color: hsl(0 0% 100%);
}

::-moz-selection {
    background-color: hsl(142 72% 42% / 0.3);
    color: hsl(0 0% 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: hsl(0 0% 5%);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, hsl(142 72% 42%), hsl(175 60% 35%));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, hsl(142 72% 52%), hsl(175 60% 45%));
}

/* Focus States Melhorados */
button:focus-visible,
a:focus-visible {
    outline: 2px solid hsl(142 72% 42%);
    outline-offset: 4px;
}

/* Animação de Entrada para Cards */
@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-card-in {
    animation: card-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Efeito Parallax para Backgrounds */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Números com Counter Animation */
@keyframes count-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter {
    animation: count-up 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Hover Effect para Imagens */
img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

img:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Badge com Pulse */
.badge-pulse {
    position: relative;
}

.badge-pulse::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: hsl(142 72% 42% / 0.3);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Grid Pattern Background */
.grid-pattern {
    background-image: 
        linear-gradient(hsl(0 0% 18% / 0.5) 1px, transparent 1px),
        linear-gradient(90deg, hsl(0 0% 18% / 0.5) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Smooth Transitions Global */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .shadow-elevated {
        box-shadow: 
            0 15px 40px -15px rgba(0, 0, 0, 0.6),
            0 5px 20px -5px hsl(142 72% 42% / 0.15);
    }
    
    button,
    .inline-flex {
        min-height: 44px; /* Touch target size */
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    body {
        color: hsl(0 0% 95%);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-card {
        border: 2px solid hsl(0 0% 100%);
    }
    
    button {
        border: 2px solid currentColor;
    }
}

/* Interactive States */
button:hover,
.inline-flex:hover {
    cursor: pointer;
}

button:disabled,
.inline-flex:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Tooltip Styles */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: hsl(0 0% 10%);
    color: hsl(0 0% 100%);
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* Success/Error States */
.state-success {
    border-color: hsl(142 72% 42%) !important;
    box-shadow: 0 0 0 3px hsl(142 72% 42% / 0.2);
}

.state-error {
    border-color: hsl(0 84% 60%) !important;
    box-shadow: 0 0 0 3px hsl(0 84% 60% / 0.2);
}

/* Skeleton Loader */
.skeleton-text {
    height: 1em;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

/* Prioridade de Performance */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Anti-aliasing */
body,
button,
input,
textarea {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
