/*
 * Codegotchi Site - Custom Styles
 * Complementa o Tailwind CSS
 */

/* Smooth scrolling para toda a pagina */
html {
    scroll-behavior: smooth;
}

/* Remove outline azul padrao e adiciona um estilo melhor */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animacao de fade-in para elementos */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Animacao de pulse para elementos destacados */
@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.gentle-pulse {
    animation: gentlePulse 3s ease-in-out infinite;
}

/* Gradiente animado para textos especiais */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Efeito de glow para botoes primarios */
.glow-effect {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

/* Estilo para links com underline animado */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #a855f7, #9333ea);
    transition: width 0.3s ease;
}

.link-underline:hover::after {
    width: 100%;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Selection color */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: white;
}

/* Cards com efeito de hover 3D sutil */
.card-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.card-3d:hover {
    transform: translateY(-4px) rotateX(2deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Background com noise texture sutil */
.noise-bg {
    position: relative;
}

.noise-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Efeito de typing cursor */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
}

/* Responsividade para textos */
@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* Animacao para icons flutuantes */
@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(5deg);
    }
    75% {
        transform: translateY(5px) rotate(-5deg);
    }
}

.float-icon {
    animation: floatIcon 4s ease-in-out infinite;
}

/* Estilo para codigo/terminal */
.terminal {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

/* Glassmorphism effect */
.glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Efeito shimmer para loading states */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Badge de status */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

/* Transicao suave para temas */
* {
    transition-property: background-color, border-color, color;
    transition-duration: 0.15s;
    transition-timing-function: ease-out;
}

/* Desabilita transicoes durante resize */
.resize-animation-stopper * {
    transition: none !important;
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}
