/*
Theme Name: BeiraJovem LinkTree
Description: Tema moderno de linktree para o grupo de jovens BeiraJovem
Version: 1.0
Author: BeiraJovem
*/

/* Base reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Importar Tailwind CSS via CDN no head */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #f59e0b 0%, #10b981 25%, #3b82f6 50%, #8b5cf6 75%, #f59e0b 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow-x: hidden;
}

/* Animação do gradiente de fundo - SEMPRE ATIVA */
@keyframes gradientShift {
    0% { 
        background-position: 0% 50%; 
    }
    25% { 
        background-position: 100% 50%; 
    }
    50% { 
        background-position: 100% 100%; 
    }
    75% { 
        background-position: 0% 100%; 
    }
    100% { 
        background-position: 0% 50%; 
    }
}

/* Força a animação do fundo a sempre continuar */
body, body * {
    will-change: auto;
}

body {
    will-change: background-position;
}

/* Garante que a animação do fundo NUNCA seja desabilitada */
body {
    animation-name: gradientShift !important;
    animation-duration: 8s !important;
    animation-timing-function: ease !important;
    animation-iteration-count: infinite !important;
    animation-direction: normal !important;
    animation-fill-mode: none !important;
    animation-play-state: running !important;
}

/* Sobrescreve qualquer tentativa de parar a animação */
body[style*="animation-play-state: paused"] {
    animation-play-state: running !important;
}

/* CSS específico para customizer */
.customize-preview body {
    animation: gradientShift 8s ease infinite !important;
}

/* Efeito de textura/grain */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 1;
}

/* Container principal */
.linktree-container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Logo container */
.logo-container {
    margin-bottom: 2rem;
    text-align: center;
}

.logo-container img {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

/* Título */
.linktree-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Subtítulo */
.linktree-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Container dos links */
.links-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Estilo dos botões de link */
.link-button {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    color: white;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-button.beiracast {
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #C084FC 100%) !important;
    color: #fff !important;
    border: none;
    box-shadow: 0 4px 24px rgba(139,92,246,0.15);
    font-size: 1.15rem;
    letter-spacing: 1px;
}

.beiracast-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInModal 0.3s ease;
}

.beiracast-modal-content {
    background: #fff;
    border-radius: 24px;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 32px rgba(139,92,246,0.18);
    max-width: 340px;
    width: 90vw;
    text-align: center;
    position: relative;
    animation: modalPop 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}

.beiracast-modal-logo img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.beiracast-modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 2rem;
    color: #8B5CF6;
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
}
.beiracast-modal-close:hover {
    color: #A855F7;
}

.beiracast-modal-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}
.beiracast-link {
    display: block;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}
.beiracast-link.youtube {
    background: linear-gradient(90deg, #FF0000 0%, #C4302B 100%);
}
.beiracast-link.spotify {
    background: linear-gradient(90deg, #1DB954 0%, #191414 100%);
}
.beiracast-link:hover {
    filter: brightness(1.08);
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.link-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.link-button:hover::before {
    left: 100%;
}

.link-button:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.link-button:active {
    transform: translateY(0);
}

/* Responsividade */
@media (max-width: 768px) {
    .linktree-title {
        font-size: 2rem;
    }
    
    .linktree-container {
        padding: 1rem;
    }
    
    .links-container {
        max-width: 350px;
    }
}

@media (max-width: 480px) {
    .linktree-title {
        font-size: 1.8rem;
    }
    
    .logo-container img {
        max-width: 120px;
    }
    
    .links-container {
        max-width: 320px;
    }
}
