/* === MODERN GLOBAL ENHANCEMENTS === */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* === TIPOGRAFIA PREMIUM - Hierarquia Visual === */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }

p, li, span {
    line-height: 1.6;
}

/* === ANIMAÇÕES DE ENTRADA PREMIUM === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 0.1s; opacity: 0; }
.delay-200 { animation-delay: 0.2s; opacity: 0; }
.delay-300 { animation-delay: 0.3s; opacity: 0; }
.delay-400 { animation-delay: 0.4s; opacity: 0; }
.delay-500 { animation-delay: 0.5s; opacity: 0; }

/* === MICRO-INTERAÇÕES PREMIUM === */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 40px rgba(139, 92, 246, 0.1);
}

.hover-scale {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-scale:hover {
    transform: scale(1.03);
}

.interactive-border {
    position: relative;
}

.interactive-border::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #3b82f6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.interactive-border:hover::after {
    width: 100%;
}

/* Gradient text utility */
.text-gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === PREMIUM BUTTONS === */
.bg-purple-600, .bg-purple-500, [class*="bg-purple-6"], [class*="bg-purple-5"] {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

.bg-purple-600:hover, .bg-purple-500:hover, [class*="bg-purple-6"]:hover, [class*="bg-purple-5"]:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35) !important;
}

.bg-gradient-to-r {
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-r::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.bg-gradient-to-r:hover::after {
    transform: translateX(100%);
}

/* === PREMIUM GLOW LINE === */
.tool-section h2,
.tool-section h3 {
    position: relative;
}

/* === DARK ELEVATED SURFACES === */
.bg-slate-900, .bg-gray-900 {
    background: var(--bg-tertiary) !important;
}

.border-slate-700, .border-gray-700, .border-slate-600 {
    border-color: var(--border-color) !important;
}

/* === RESPONSIVIDADE AVANÇADA PARA MOBILE === */
/* iPhone SE, iPhone 12/13/14 Mini */
@media (max-width: 375px) {
    body { font-size: 13px; }
    nav { top: 8px !important; width: 98% !important; }
    nav h1 { font-size: 0.8rem !important; }
    .feature-card { min-height: 120px; padding: 12px; }
    .tool-section { margin: 0.5rem; padding: 1rem !important; }
    input, textarea, select { font-size: 16px !important; }
}

/* iPhone 12/13/14/15 Pro, Pixel 7 */
@media (min-width: 376px) and (max-width: 428px) {
    body { font-size: 14px; }
    nav { top: 10px !important; }
    input, textarea, select { font-size: 16px !important; }
}

/* iPhone 14/15 Pro Max, Samsung Galaxy S23 Ultra */
@media (min-width: 429px) and (max-width: 480px) {
    body { font-size: 14.5px; }
}

/* iOS-specific: prevent zoom on input focus */
@supports (-webkit-touch-callout: none) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* Safe area insets for notch/dynamic island */
@supports (padding: env(safe-area-inset-top)) {
    nav {
        padding-top: env(safe-area-inset-top);
    }
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
    button, a, [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    .feature-card:hover {
        transform: none;
    }
    
    .feature-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* === SCROLL SNAP SUAVE PARA SECÇÕES (MOBILE) === */
@media (max-width: 768px) {
    .tool-section {
        scroll-margin-top: 80px;
    }
}

/* Scrollbar - Dark Premium */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.25), rgba(99, 102, 241, 0.25));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.5), rgba(99, 102, 241, 0.5));
}

html.light-mode ::-webkit-scrollbar-track {
    background: rgba(248, 250, 252, 0.8);
}

html.light-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Input Enhancements */
input, textarea, select {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px var(--accent-soft), 0 0 20px rgba(139, 92, 246, 0.06) !important;
    border-color: var(--accent) !important;
}

/* Button Enhancements */
button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active:not(:disabled) {
    transform: scale(0.97);
}

/* Selection Color */
::selection {
    background: rgba(139, 92, 246, 0.35);
    color: #fff;
}

/* === PERFORMANCE OPTIMIZATIONS === */
/* GPU acceleration para animações */
.tool-section, .feature-card, .widget, nav, .modal-content {
    will-change: transform;
    contain: layout style;
}

/* Content-visibility para secções fora do viewport */
.tool-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* Reduzir repaints */
.star, .shooting-star, .galaxy-particle, .nebula {
    will-change: transform, opacity;
    contain: strict;
}

/* Otimizar rendering de imagens */
img {
    content-visibility: auto;
}

/* ===== DARK PREMIUM THEME ===== */
:root {
    --bg-primary: #07080d;
    --bg-secondary: #0c0e16;
    --bg-tertiary: #10121c;
    --bg-card: rgba(14, 16, 26, 0.75);
    --bg-card-hover: rgba(20, 23, 38, 0.85);
    --bg-elevated: rgba(18, 21, 35, 0.9);
    --bg-input: rgba(12, 14, 24, 0.9);
    --text-color: #e2e8f0;
    --text-muted: #64748b;
    --text-dim: #475569;
    --border-color: rgba(139, 92, 246, 0.08);
    --border-hover: rgba(139, 92, 246, 0.2);
    --accent: #8b5cf6;
    --accent-soft: rgba(139, 92, 246, 0.15);
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-secondary: #6366f1;
    --accent-blue: #3b82f6;
    --card-bg: var(--bg-card);
    --card-hover: var(--bg-card-hover);
    --input-bg: var(--bg-input);
    --input-text: var(--text-color);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.15);
}

body {
    background: var(--bg-primary);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }
    
    h2 {
        font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
    }
    
    h3 {
        font-size: clamp(1rem, 3.5vw, 1.5rem) !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    body {
        font-size: 15px;
    }
}

@media (min-width: 1920px) {
    .max-w-4xl {
        max-width: 90rem;
    }
}

@media (max-width: 640px) {
    nav {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    nav h1 {
        font-size: 1.25rem !important;
    }
    
    nav .w-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }
    
    .max-w-4xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .max-w-2xl, .max-w-3xl {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    button, a {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    input, textarea {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .max-w-4xl {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .max-w-4xl {
        max-width: 56rem;
    }
}

@media (min-width: 1441px) {
    .max-w-4xl {
        max-width: 72rem;
    }
}

@media (max-width: 768px) {
    .feature-card {
        flex: 1 1 calc(50% - 1rem);
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .feature-card {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    table {
        font-size: 0.75rem;
    }
    
    table th, table td {
        padding: 0.5rem;
    }
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 640px) {
    .modal-content {
        max-height: 85vh;
        padding: 1rem;
    }
}

img {
    max-width: 100%;
    height: auto;
}

video, iframe {
    max-width: 100%;
    height: auto;
}

@media (max-width: 640px) {
    video, iframe {
        width: 100%;
        height: auto;
        min-height: 200px;
    }
}

/* Modo Claro */
html.light-mode {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.98);
    --card-hover: rgba(241, 245, 249, 0.95);
    --border-color: #cbd5e1;
    --input-bg: rgba(255, 255, 255, 0.95);
    --input-text: #0f172a;
}

html.light-mode body {
    background: #f8fafc;
    color: #0f172a;
}

/* Navbar no modo claro */
html.light-mode nav {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)) !important;
    border-bottom-color: #cbd5e1 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Estilos do Sistema de Notificações */
#notificationDropdown {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-item {
    transition: all 0.2s ease;
}

.notification-item:hover {
    transform: translateX(4px);
}

.notification-item:last-child {
    border-bottom: none !important;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Custom Scrollbar para Notificações */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Feature Cards - Premium Dark */
.feature-card {
    position: relative;
    width: 100%;
    max-width: 280px;
    min-width: 200px;
    height: auto;
    min-height: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 640px) {
    .feature-card {
        max-width: 100%;
        padding: 16px;
        min-height: 140px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .feature-card {
        max-width: 240px;
    }
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: currentColor;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.08);
    background: var(--bg-card-hover);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.feature-emoji {
    font-size: clamp(32px, 6vw, 48px);
    display: block;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card:hover .feature-emoji {
    transform: scale(1.15);
}

.feature-content {
    text-align: center;
    position: relative;
}

.feature-content h3 {
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.feature-line {
    width: 40px;
    height: 2px;
    margin: 12px auto 0;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.4s ease 0.1s;
}

.feature-card:hover .feature-line {
    transform: scaleX(1);
}

.feature-secure {
    color: #34d399;
}

.feature-secure:hover {
    background: rgba(16, 185, 129, 0.06);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.15), 0 0 40px rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
}

.feature-fast {
    color: #60a5fa;
}

.feature-fast:hover {
    background: rgba(59, 130, 246, 0.06);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.15), 0 0 40px rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-premium {
    color: #c084fc;
}

.feature-premium:hover {
    background: rgba(168, 85, 247, 0.06);
    box-shadow: 0 20px 50px rgba(168, 85, 247, 0.15), 0 0 40px rgba(168, 85, 247, 0.05);
    border-color: rgba(168, 85, 247, 0.3);
}

/* Estilos para as bandeiras flag-icons */
.fi {
    display: inline-block !important;
    width: 1.5em !important;
    height: 1.5em !important;
    min-width: 1.5em !important;
    min-height: 1.5em !important;
    background-size: contain !important;
    background-position: 50% !important;
    background-repeat: no-repeat !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    border-radius: 2px;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}

/* Garantir que as bandeiras sejam exibidas corretamente */
.fi.fi-pt,
.fi.fi-um,
.fi.fi-fr {
    width: 1.5em !important;
    height: 1.5em !important;
    min-width: 1.5em !important;
    min-height: 1.5em !important;
    display: inline-block !important;
    vertical-align: middle !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    flex-shrink: 0 !important;
}

/* Forçar exibição das bandeiras */
span.fi {
    font-size: 1.5rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

/* Cards e containers no modo claro */
html.light-mode .bg-slate-800,
html.light-mode .bg-slate-900,
html.light-mode [class*="bg-slate"] {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9)) !important;
    border-color: rgba(203, 213, 225, 0.6) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

html.light-mode .tool-section {
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(203, 213, 225, 0.5) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 0 0 0 0 rgba(139, 92, 246, 0) !important;
}

html.light-mode .tool-section:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 0 20px rgba(139, 92, 246, 0.05) !important;
    border-color: rgba(139, 92, 246, 0.15) !important;
}

/* Textos no modo claro */
html.light-mode .text-white,
html.light-mode .text-gray-100,
html.light-mode .text-gray-200 {
    color: #0f172a !important;
}

html.light-mode .text-gray-300 {
    color: #475569 !important;
}

html.light-mode .text-gray-400 {
    color: #64748b !important;
}

html.light-mode .text-gray-500 {
    color: #94a3b8 !important;
}

/* Botões no modo claro */
html.light-mode button:not(.bg-purple-600):not(.bg-green-600):not(.bg-yellow-600):not(.bg-red-600),
html.light-mode .bg-slate-700 {
    background-color: rgba(241, 245, 249, 0.9) !important;
    color: #0f172a !important;
}

html.light-mode button:hover:not(.bg-purple-600):not(.bg-green-600):not(.bg-yellow-600):not(.bg-red-600) {
    background-color: rgba(226, 232, 240, 0.9) !important;
}

/* Inputs no modo claro */
html.light-mode input,
html.light-mode textarea,
html.light-mode select {
    background-color: white !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

html.light-mode input:focus,
html.light-mode textarea:focus,
html.light-mode select:focus {
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}

/* Dropdown menus no modo claro */
html.light-mode [class*="absolute"][class*="bg-slate"] {
    background-color: white !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Bordas no modo claro */
html.light-mode .border-slate-700,
html.light-mode .border-slate-600 {
    border-color: #cbd5e1 !important;
}

/* Hover effects no modo claro */
html.light-mode .hover\:bg-slate-700:hover {
    background-color: rgba(241, 245, 249, 0.8) !important;
}

/* Badges e tags no modo claro */
html.light-mode .bg-slate-800:not(.bg-purple-600):not(.bg-green-600):not(.bg-yellow-600) {
    background-color: rgba(248, 250, 252, 0.95) !important;
}

/* Base Styles */
body {
    background: #0f172a;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Premium Dark Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 0% 100%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 100% 100% at 50% 50%, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
    opacity: 0.4;
}

/* Hide old nebula effects */
.nebula {
    display: none;
}


/* Stars Container */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: transparent;
    transition: background 0.3s ease;
}

.light .stars {
    opacity: 0.1;
}

/* Animated Stars */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 5s infinite;
}

.star.small {
    width: 1px;
    height: 1px;
    opacity: 0.15;
    animation-duration: 3s;
}

.star.medium {
    width: 1.5px;
    height: 1.5px;
    opacity: 0.3;
    animation-duration: 4s;
}

.star.large {
    width: 2px;
    height: 2px;
    opacity: 0.5;
    animation-duration: 6s;
    box-shadow: 0 0 4px rgba(139, 92, 246, 0.4);
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), transparent);
    animation: shoot 3s linear infinite;
    opacity: 0;
}

@keyframes shoot {
    0% {
        transform: translateX(-100px) translateY(0) rotate(-45deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 100px)) translateY(100vh) rotate(-45deg);
        opacity: 0;
    }
}

/* Nebula Effect */
.nebula {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.1) 0%, transparent 70%);
    filter: blur(40px);
    animation: float 20s ease-in-out infinite;
    z-index: -1;
}

.nebula:nth-child(2) {
    background: radial-gradient(circle, rgba(30, 144, 255, 0.1) 0%, transparent 70%);
    animation-delay: -5s;
    animation-duration: 25s;
}

.nebula:nth-child(3) {
    background: radial-gradient(circle, rgba(255, 20, 147, 0.1) 0%, transparent 70%);
    animation-delay: -10s;
    animation-duration: 30s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Galaxy Particles */
.galaxy-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    animation: galaxyFloat 15s linear infinite;
}

@keyframes galaxyFloat {
    0% {
        transform: rotate(0deg) translateX(100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: rotate(360deg) translateX(100px) rotate(-360deg);
        opacity: 0;
    }
}

/* Card Styles - Dark Premium */
.bg-slate-800\/50, 
.bg-slate-800\/80,
.bg-slate-700\/30,
.bg-slate-600\/50 {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hover\:bg-slate-700\/30:hover,
.hover\:bg-slate-600\/50:hover {
    background-color: var(--bg-card-hover) !important;
    border-color: var(--border-hover) !important;
}

/* Input Fields - Dark Premium */
input[type="text"],
input[type="number"],
textarea,
select {
    background-color: var(--bg-input) !important;
    color: var(--input-text) !important;
    border-color: var(--border-color) !important;
    border-width: 1px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm) !important;
    background-color: rgba(14, 16, 26, 1) !important;
}

/* Allow selection for specific elements */
.widget-content,
#currentTime,
#visitorCount {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.light h2,
.light h3 {
    color: #0f172a !important;
    opacity: 1 !important;
}

/* Buttons */
button:not(#themeToggle) {
    color: var(--text-color) !important;
}

/* Custom Cursor - Removido */

/* Tool Sections - Dark Premium */
.tool-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 20px !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.tool-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.tool-section.fade-out {
    opacity: 0;
    transform: translateY(-30px);
}

.tool-section.visible {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.4s ease, border-color 0.4s ease;
}

.tool-section:hover {
    border-color: var(--border-hover) !important;
    box-shadow: var(--shadow-lg), var(--shadow-glow) !important;
}

/* Nav Button Effect - CodePen Style (LukyVj) */
.nav-button-effect {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    isolation: isolate;
}

.nav-button-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s;
    z-index: 1;
}

.nav-button-effect:hover::before {
    transform: translateX(200%) skewX(-15deg);
}

.nav-button-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s;
    z-index: 1;
}

.nav-button-effect:hover::after {
    transform: translateX(200%) translateY(200%) rotate(45deg);
}

.nav-button-effect > * {
    position: relative;
    z-index: 2;
}

.nav-button-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
    background: rgba(139, 92, 246, 0.06);
}

nav {
    min-height: 64px;
    overflow: visible;
    background: rgba(7, 8, 13, 0.85) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.04) !important;
}

nav > div {
    overflow: visible;
}

nav {
    overflow: visible !important;
}

nav > div {
    overflow: visible !important;
}

nav > div > div.flex.items-center {
    overflow: visible;
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 640px) {
    nav {
        min-height: 60px;
    }
    
    nav h1 {
        font-size: 0.875rem !important;
    }
    
    nav .w-8 {
        width: 1.75rem !important;
        height: 1.75rem !important;
    }
    
    nav .flex.items-center.gap-1 {
        gap: 0.25rem !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    nav {
        min-height: 68px;
    }
}

@media (min-width: 1025px) and (max-width: 1279px) {
    nav .hidden.lg\\:flex {
        gap: 0.25rem;
        flex-shrink: 1;
        min-width: 0;
    }
    
    nav .hidden.lg\\:flex a {
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    nav .hidden.lg\\:flex a span {
        display: none;
    }
    
    nav .hidden.lg\\:flex a i {
        margin: 0;
    }
}

@media (min-width: 1280px) and (max-width: 1535px) {
    nav .hidden.lg\\:flex {
        gap: 0.375rem;
    }
    
    nav .hidden.lg\\:flex a {
        padding: 0.5rem 0.625rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 1536px) {
    nav .hidden.lg\\:flex {
        gap: 0.5rem;
    }
    
    nav .hidden.lg\\:flex a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9375rem;
    }
}

nav > div > div.flex.items-center > div:first-child {
    flex-shrink: 0;
    min-width: fit-content;
}

nav > div > div.flex.items-center > div:last-child {
    flex-shrink: 0;
    min-width: fit-content;
}

nav > div > div.flex.items-center > div:nth-child(2) {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

@media (max-width: 1024px) {
    nav .hidden.lg\\:flex {
        display: none !important;
    }
}

nav #authButtonsArea {
    flex-shrink: 0;
    min-width: fit-content;
}

nav #authButtonsArea button,
nav #authButtonsArea a {
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    nav #authButtonsArea button,
    nav #authButtonsArea a {
        font-size: 0.8125rem;
        padding: 0.5rem 0.875rem;
    }
}

@media (min-width: 1280px) {
    nav #authButtonsArea button,
    nav #authButtonsArea a {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

/* Tool Section Modern Style */
.tool-section {
    position: relative;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(139, 92, 246, 0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.3), 0 0 30px -5px rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.2);
    background: rgba(15, 23, 42, 0.75);
}

.tool-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 100%
    );
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.6s;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
}

.tool-section:hover::before {
    transform: translateX(200%) skewX(-15deg);
}

.tool-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
}

.tool-section:hover::after {
    transform: translateX(200%) translateY(200%) rotate(45deg);
}

.tool-section.visible:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

/* === SOON / Coming Soon Tool State === */
.tool-section.tool-soon {
    position: relative;
    pointer-events: none;
    user-select: none;
}

.tool-section.tool-soon > button,
.tool-section.tool-soon > div {
    opacity: 0.35;
    filter: grayscale(80%) brightness(0.7);
    transition: opacity 0.3s, filter 0.3s;
}

.tool-section.tool-soon:hover {
    transform: none !important;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.tool-section.tool-soon::after {
    display: none;
}

.tool-soon-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border-radius: inherit;
}

.tool-soon-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.92));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: soonPulse 3s ease-in-out infinite;
}

.tool-soon-badge .soon-icon {
    font-size: 1.25rem;
    opacity: 0.7;
}

.tool-soon-badge .soon-text {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
    text-shadow: 0 0 20px rgba(148, 163, 184, 0.3);
}

@keyframes soonPulse {
    0%, 100% { 
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        border-color: rgba(148, 163, 184, 0.25);
    }
    50% { 
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(148, 163, 184, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
        border-color: rgba(148, 163, 184, 0.4);
    }
}

/* SOON state - Light Mode */
html.light-mode .tool-section.tool-soon > button,
html.light-mode .tool-section.tool-soon > div:not(.tool-soon-overlay) {
    opacity: 0.3;
    filter: grayscale(70%) brightness(0.85);
}

html.light-mode .tool-soon-badge {
    background: linear-gradient(135deg, rgba(241, 245, 249, 0.97), rgba(226, 232, 240, 0.95));
    border-color: rgba(100, 116, 139, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

html.light-mode .tool-soon-badge .soon-text {
    color: rgba(71, 85, 105, 0.9);
    text-shadow: none;
}

/* Custom Cursor - Removido */

/* Widget Sidebar Styles */
.widget-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    z-index: 100;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.widget {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

/* Drag & Drop Styles */
#dropZone {
    transition: all 0.3s ease;
    position: relative;
}

#dropZone.scale-105 {
    transform: scale(1.02);
}

#dropZone.border-purple-500 > * {
    opacity: 0.3;
}

/* Overlay de drag & drop */
.drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #a855f7;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 10;
    background: rgba(30, 41, 59, 0.95);
    border-radius: 0.5rem;
}

.widget:hover::before {
    left: 100%;
}

.widget:hover {
    background: rgba(51, 65, 85, 0.9);
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.3);
    border-color: rgba(0, 255, 136, 0.5);
}

.widget-title {
    color: #00ff88;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.widget-content {
    color: #f8fafc;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px rgba(248, 250, 252, 0.3);
}

.widget-subtitle {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.8;
}

/* Add glow effect to visitor counter */
#visitorCount {
    background: linear-gradient(45deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 255, 136, 0.5));
}

/* Add time widget special effects */
#currentTime {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.5));
}

/* === WIDGET BOTTOM LEFT ANIMATIONS === */
@keyframes slideInBottomLeft {
    from {
        opacity: 0;
        transform: translateX(-50px) translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* Hover effects for bottom left widgets */
div[style*="position: fixed"][style*="left: 20px"][style*="bottom: 20px"] > div:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(147, 51, 234, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* Shimmer effect */
div[style*="position: fixed"][style*="left: 20px"][style*="bottom: 20px"] > div::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent) !important;
    transition: left 0.6s ease !important;
}

div[style*="position: fixed"][style*="left: 20px"][style*="bottom: 20px"] > div:hover::before {
    left: 100% !important;
}

/* === BACK TO TOP & GRABIFY === */
/* Back to Top Button Styles */
#backToTopBtn {
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease; 
    pointer-events: none;
}

#backToTopBtn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#backToTopBtn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Grabify buttons - ensure always clickable */
.grabify-copy-btn,
#grabifyResults button,
#grabifyVisitorsSection button,
#btnCreateGrabify,
.grabify-type-btn {
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1000 !important;
    user-select: none;
}

.grabify-copy-btn:hover {
    transform: scale(1.02);
}

.grabify-copy-btn:active {
    transform: scale(0.98);
}

.grabify-type-btn {
    transition: all 0.2s ease !important;
}

.grabify-type-btn:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.8) !important;
}

.grabify-type-btn.active {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: #22c55e !important;
}

#grabifyResults,
#grabifyVisitorsSection {
    position: relative;
    z-index: 50;
}

/* === VISUAL ENHANCEMENTS & PERFORMANCE === */
/* Fundo simples e rápido - removido para melhor performance */

/* Container principal com melhor profundidade */
.max-w-4xl {
    position: relative;
    z-index: 1;
}

/* Scrollbar simples */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #a78bfa 100%);
}

/* Seleção de texto personalizada */
::selection {
    background-color: rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

/* Botões melhorados globalmente */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Inputs melhorados */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

/* Carregamento melhorado */
.animate-spin {
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.5));
}

/* Badges premium com brilho */
.bg-gradient-to-r {
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-r::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === OTIMIZAÇÕES DE PERFORMANCE ADICIONAIS === */
/* Reduzir layout thrashing */
.tool-section, .feature-card {
    contain: content;
}

/* Otimizar scroll */
html {
    scroll-behavior: smooth;
}

/* Reduzir animações para utilizadores que preferem */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .star, .shooting-star, .galaxy-particle, .nebula {
        display: none !important;
    }
}

/* === SCROLL PERFORMANCE === */
body.is-scrolling .tool-section,
body.is-scrolling .feature-card {
    pointer-events: none;
}
body.is-scrolling .tool-section:hover,
body.is-scrolling .feature-card:hover {
    transform: none !important;
    box-shadow: none !important;
}