/**
 * ESTILOS DE COMPONENTES
 * Cache Busting: 20260107
 */

/* ============================================
   FUNDO TECH - GRID + GRADIENTE
   ============================================ */

.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.8) 0%, rgba(240,253,244,0.5) 50%, #f3f4f6 100%);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.bg-grid-tech {
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(6, 182, 212, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(6, 182, 212, 0.07) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

/* ============================================
   ORBS ANIMADOS
   ============================================ */

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: floatOrb 15s infinite ease-in-out;
    z-index: -1;
}

.orb-1 {
    width: 350px;
    height: 350px;
    background: #a3e635;
    top: -15%;
    left: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: #22d3ee;
    bottom: -15%;
    right: -15%;
    animation-delay: -5s;
}

/* ============================================
   HUD BUTTONS - MODO CLARO PADRÃO
   ============================================ */

.hud-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    clip-path: polygon(
        10px 0, 100% 0, 
        100% calc(100% - 10px), calc(100% - 10px) 100%, 
        0 100%, 0 10px
    );
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.0);
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

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

.hud-btn:hover .hud-btn-border {
    border-color: #84cc16;
}

/* ============================================
   HUD BUTTON DARK - PARA CONTATOS
   ============================================ */

.hud-btn-dark {
    position: relative;
    background: #0f172a;
    color: white;
    clip-path: polygon(
        10px 0, 100% 0, 
        100% calc(100% - 10px), calc(100% - 10px) 100%, 
        0 100%, 0 10px
    );
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.hud-btn-dark:hover {
    background: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 0 15px rgba(132, 204, 22, 0.2);
}

.hud-btn-dark:active {
    transform: scale(0.98);
}

/* ============================================
   HUD BUTTON BORDER
   ============================================ */

.hud-btn-border {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    border: 1px solid rgba(0,0,0,0.1);
    clip-path: polygon(
        10px 0, 100% 0, 
        100% calc(100% - 10px), calc(100% - 10px) 100%, 
        0 100%, 0 10px
    );
    transition: border-color 0.3s ease;
}

/* ============================================
   HUD CARD
   ============================================ */

.hud-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    clip-path: polygon(
        12px 0, 100% 0, 
        100% calc(100% - 12px), 
        calc(100% - 12px) 100%, 
        0 100%, 0 12px
    );
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.hud-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.1) 100%);
    z-index: -1;
    border-radius: inherit;
}

.hud-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(to top left, rgba(6, 182, 212, 0.4) 50%, transparent 50%);
    z-index: 10;
}

.hud-card:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.3));
}

/* ============================================
   BOTÃO INATIVO
   ============================================ */

.btn-locked {
    background: rgba(228, 228, 231, 0.4);
    opacity: 0.8;
    cursor: not-allowed;
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

/* ============================================
   AVATAR COM EFEITOS
   ============================================ */

.avatar-container {
    position: relative;
}

.avatar-scan {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #84cc16;
    box-shadow: 0 0 15px #84cc16;
    opacity: 0;
    animation: scan 4s ease-in-out infinite;
}

.orbital-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px dashed #84cc16;
    animation: spin 10s linear infinite;
}

.orbital-ring-2 {
    position: absolute;
    width: 115%;
    height: 115%;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-top-color: transparent;
    animation: spin 8s linear infinite reverse;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(132, 204, 22, 0.2), transparent);
    animation: scan 3s linear infinite;
    border-radius: 50%;
    pointer-events: none;
}

/* ============================================
   TAGS E BADGES
   ============================================ */

.tech-tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    background: rgba(132, 204, 22, 0.1);
    color: #4d7c0f;
    border: 1px solid rgba(132, 204, 22, 0.3);
    border-radius: 2px;
    display: inline-block;
}

.tag {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 2px;
    letter-spacing: 0.05em;
    display: inline-block;
}

.tag-mandatory {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.tag-optional {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.tag-model {
    background: rgba(132, 204, 22, 0.1);
    color: #4d7c0f;
    border: 1px solid rgba(132, 204, 22, 0.3);
}

/* ============================================
   BLOCOS DE CÓDIGO
   ============================================ */

.model-block {
    font-family: 'JetBrains Mono', monospace;
    background: #ffffff;
    border-left: 3px solid #84cc16;
    padding: 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: #1f2937;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.02);
    word-wrap: break-word;
    margin-bottom: 1rem;
}

.comment-block {
    background: rgba(6, 182, 212, 0.05);
    border: 1px dashed rgba(6, 182, 212, 0.4);
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border-radius: 0.375rem;
}

/* ============================================
   BLOCOS ESPECIAIS
   ============================================ */

.priority-block {
    border-left: 4px solid #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
}

.base-block {
    border-left: 4px solid #06b6d4;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.05) 0%, transparent 100%);
}

/* ============================================
   PROGRESS BAR
   ============================================ */

#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(to right, #06b6d4, #84cc16, #06b6d4);
    z-index: 70;
    width: 0%;
    transition: width 0.1s ease;
}

/* ============================================
   NAVBAR
   ============================================ */

nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-clip {
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.active-tab {
    background-color: #06b6d4;
    color: white;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
    border: none;
}

/* ============================================
   LOADER
   ============================================ */

.loader {
    border: 3px solid rgba(6, 182, 212, 0.1);
    border-left-color: #06b6d4;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

/* ============================================
   COPY BUTTON
   ============================================ */

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s;
    background: none;
    border: none;
    padding: 0.5rem;
}

.copy-btn:hover {
    opacity: 1;
    color: #84cc16;
}

/* ============================================
   MAGIC SQUARE GRID
   ============================================ */

.magic-square {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: #e5e7eb;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    border-radius: 4px;
}

@media (min-width: 640px) {
    .magic-square {
        grid-template-columns: repeat(2, 1fr);
    }
}

.magic-cell {
    background: white;
    padding: 1rem;
    transition: all 0.2s;
}

.magic-cell:hover {
    background: #f0fdf4;
}

/* ============================================
   PROSE/CONTEÚDO
   ============================================ */

.prose p {
    margin-bottom: 1.25em;
    line-height: 1.75;
    font-family: 'Inter', sans-serif;
}

.prose h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-top: 2.5em;
    margin-bottom: 1em;
    color: #1e293b;
    border-left: 4px solid #06b6d4;
    padding-left: 1rem;
}

.prose h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #334155;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}

.prose strong {
    color: #06b6d4;
    font-weight: 700;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .hud-card {
        clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    }

    .hud-btn {
        clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    }

    .orb-1 {
        width: 250px;
        height: 250px;
    }

    .orb-2 {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hud-card {
        clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    }

    .hud-btn {
        clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
    }
}
