/* ========== RESET E TIPOGRAFIA ========== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

/* ========== FUNDO COM 4 CORES NOS CANTOS (FIXO) ========== */
body {
/* Gradientes radiais em cada canto, com desvanecimento até transparente */
background:
radial-gradient(circle at 0% 0%, #BBDEBE 0%, transparent 70%),
radial-gradient(circle at 100% 0%, #F0DCAF 0%, transparent 70%),
radial-gradient(circle at 0% 100%, #98DFCB 0%, transparent 70%),
radial-gradient(circle at 100% 100%, #71D7E2 0%, transparent 70%);
background-attachment: fixed; /* fundo fixo, não rola com a página */
background-size: cover;
background-repeat: no-repeat;
font-family: system-ui, 'Segoe UI', 'Roboto', sans-serif;
color: #2d2b26;
line-height: 1.4;
min-height: 100vh;
padding-bottom: 70px; /* espaço para o menu inferior */
}

/* ========== CORES E PADRÕES (variáveis) ========== */
:root {
--primary: #6B21A8;
--primary-dark: #4a0e7e;
--secondary: #FDE047;
--secondary-dark: #e6c200;
--terracota: #C2410C;
--terracota-light: #fde8e0;
--ninho-bg: #faf7f2;
--card-bg: #ffffff;
--border-light: #e8ddd0;
--text-dark: #2d2b26;
--text-muted: #7b6b58;
--error: #e74c3c;
--success: #2ecc71;
--warning: #f39c12;
}

/* ========== TIPOGRAFIA ========== */
h1, h2, h3, .logo {
font-family: 'Pacifico', cursive;
font-weight: 400;
}

.topo h2 {
font-size: 1.6rem;
color: #3b2e1e;
margin: 0;
}

/* ========== LAYOUT ========== */
.container {
max-width: 600px;
margin: 0 auto;
padding: 16px;
}

/* ========== MENU SUPERIOR (topo) ========== */
.topo {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 16px;
background: white;
border-bottom: 1px solid var(--border-light);
position: sticky;
top: 0;
z-index: 100;
}

/* ========== MENU INFERIOR ========== */
.menu-inferior {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: white;
display: flex;
justify-content: space-around;
padding: 10px 0;
border-top: 1px solid var(--border-light);
z-index: 200;
}

.menu-item {
text-decoration: none;
color: var(--text-muted);
font-weight: 600;
font-size: 0.9rem;
transition: color 0.2s;
}

.menu-item.ativo,
.menu-item:hover {
color: var(--primary);
}

/* ========== CARDS (posts, perfis, etc.) ========== */
.card, .post-card, .perfil-card, .ranking-card, .aviso-item {
background: var(--card-bg);
border-radius: 24px;
padding: 14px;
margin-bottom: 16px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover, .post-card:hover, .ranking-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Bordas laterais por tipo de ave (usado no feed) */
.post-card.andorinha { border-left: 6px solid #1E3A8A; }
.post-card.tordo { border-left: 6px solid var(--terracota); }
.post-card.coruja { border-left: 6px solid #451A03; }
.post-card.aguia { border-left: 6px solid #4B5563; }

/* ========== BOTÕES ========== */
button, .btn {
cursor: pointer;
font-weight: 600;
border: none;
transition: all 0.2s ease;
}

.btn-primary, .btn-enviar, .btn-cadastrar, .btn-login, .btn-seguir {
background: var(--primary);
color: var(--secondary);
padding: 10px 20px;
border-radius: 40px;
font-weight: 700;
}

.btn-primary:hover, .btn-enviar:hover, .btn-cadastrar:hover, .btn-seguir:hover {
background: var(--primary-dark);
transform: scale(1.02);
}

.btn-secondary {
background: var(--secondary);
color: var(--primary);
padding: 8px 16px;
border-radius: 40px;
font-weight: 700;
}

.btn-outline {
background: transparent;
border: 2px solid var(--primary);
color: var(--primary);
border-radius: 40px;
padding: 8px 16px;
}

.btn-danger {
background: var(--error);
color: white;
border-radius: 30px;
padding: 6px 12px;
}

.btn-warning {
background: var(--warning);
color: #2d2b26;
border-radius: 30px;
padding: 6px 12px;
}

/* ========== FORMULÁRIOS ========== */
input, textarea, select {
width: 100%;
padding: 12px;
border-radius: 30px;
border: 1.5px solid #c8e6c9;
font-size: 0.95rem;
outline: none;
transition: border 0.2s;
background: white;
}

input:focus, textarea:focus, select:focus {
border-color: var(--primary);
}

label {
font-weight: 600;
display: block;
margin-bottom: 6px;
color: var(--text-dark);
}

/* ========== AVATAR / FOTO PERFIL ========== */
.foto-perfil {
width: 100px;
height: 100px;
border-radius: 50%;
background: #ddd;
margin: 0 auto;
background-size: cover;
background-position: center;
display: flex;
align-items: center;
justify-content: center;
font-size: 2rem;
}

/* ========== SELOS E BADGES ========== */
.selo-oficial, .selo-criador {
display: inline-block;
background: var(--secondary);
color: var(--primary);
font-size: 0.7rem;
padding: 2px 8px;
border-radius: 20px;
margin-left: 6px;
font-weight: bold;
}

.selo-criador {
background: #FDE047;
color: #6B21A8;
}

/* ========== MÍDIAS (imagens, vídeos) ========== */
.grid-midias {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 8px 0;
}

.grid-midias img, .grid-midias video {
max-width: 48%;
max-height: 200px;
border-radius: 12px;
object-fit: cover;
}

.midia-placeholder {
width: 100px;
height: 100px;
background: #eee;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 12px;
color: #aaa;
}

/* ========== REAÇÕES E COMENTÁRIOS ========== */
.reacoes-barra {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 10px;
}

.reacao-btn, .btn-comentar, .btn-share {
background: #f0ebe3;
border: none;
padding: 6px 12px;
border-radius: 40px;
font-size: 0.85rem;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 4px;
}

.reacao-btn.ativo {
background: var(--primary);
color: white;
}

.btn-comentar {
background: #1E3A8A;
color: white;
}

.btn-share {
background: white;
border: 1px solid var(--border-light);
}

.comentarios-box {
margin-top: 12px;
border-top: 1px solid #eee;
padding-top: 8px;
font-size: 0.85rem;
}

.comentario-autor {
font-weight: bold;
color: var(--primary);
text-decoration: none;
}

/* ========== SKELETON LOADING ========== */
.skeleton-card {
background: white;
border-radius: 24px;
padding: 14px;
margin-bottom: 16px;
}

.skeleton-header, .skeleton-text, .skeleton-media, .skeleton-btn {
background: #e0e0e0;
border-radius: 10px;
animation: pulse 1.2s infinite ease-in-out;
}

.skeleton-header { width: 40%; height: 20px; margin-bottom: 12px; }
.skeleton-text { height: 15px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }
.skeleton-media { height: 180px; margin: 10px 0; }
.skeleton-actions { display: flex; gap: 12px; margin-top: 12px; }
.skeleton-btn { width: 60px; height: 30px; border-radius: 20px; }

@keyframes pulse {
0% { opacity: 0.6; }
50% { opacity: 1; }
100% { opacity: 0.6; }
}

/* ========== TOAST (mensagens temporárias) ========== */
.toast-custom {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: #333;
color: white;
padding: 10px 20px;
border-radius: 30px;
z-index: 9999;
font-size: 0.9rem;
font-weight: 500;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
animation: fadeInUp 0.3s ease;
pointer-events: none;
}

/* ========== MODAIS ========== */
.modal-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.6);
z-index: 300;
justify-content: center;
align-items: center;
}

.modal-overlay.ativo {
display: flex;
}

.modal-content {
background: white;
border-radius: 28px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
padding: 20px;
box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* ========== POPUPS DE BUSCA/AVISOS ========== */
.popup-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.5);
z-index: 300;
justify-content: center;
align-items: flex-start;
padding-top: 60px;
}

.popup-overlay.ativo {
display: flex;
}

.popup-container {
background: white;
border-radius: 24px;
width: 90%;
max-width: 450px;
max-height: 70vh;
overflow-y: auto;
}

/* ========== UTILITÁRIOS ========== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 640px) {
.container {
padding: 12px;
}
.post-card {
margin-bottom: 12px;
}
.reacoes-barra {
gap: 4px;
}
.reacao-btn, .btn-comentar, .btn-share {
padding: 4px 8px;
font-size: 0.75rem;
}
}

/* ========== ANIMAÇÃO DO TOAST ========== */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateX(-50%) translateY(20px);
}
to {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}