:root {
    --primary-color: #1a4170;
    --secondary-color: #00a8e8;
    --accent-color: #ff9900;
    --success-color: #38b000;
    --text-color: #ffffff;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs */
.background-blob {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: blob-float 20s infinite alternate;
}

.blob-1 {
    background: var(--primary-color);
    top: -100px;
    right: -100px;
}

.blob-2 {
    background: var(--secondary-color);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes blob-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Header */
.header {
    padding: 40px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--card-border);
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* Container */
.container {
    flex-grow: 1;
    max-width: 600px;
    width: 95%;
    margin: 30px auto;
    padding: 0 10px;
}

.links-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Link Cards */
.link-card {
    display: flex;
    align-items: center;
    padding: 18px 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    border-radius: 20px;
    text-decoration: none;
    color: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.link-card:hover::before {
    transform: translateX(100%);
}

.link-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 1.8rem;
    margin-right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.card-content {
    flex-grow: 1;
    text-align: left;
}

.card-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.card-content p {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.4;
}

.card-arrow {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
}

.link-card:hover .card-arrow {
    color: white;
    transform: translateX(5px);
}

/* Card Specific Colors */
.promo-card:hover { border-color: var(--accent-color); }
.promo-card .card-icon { color: var(--accent-color); }

.energy-card:hover { border-color: var(--success-color); }
.energy-card .card-icon { color: var(--success-color); }

.health-card:hover { border-color: #3b82f6; }
.health-card .card-icon { color: #3b82f6; }

.instagram-card:hover { border-color: #e1306c; }
.instagram-card .card-icon { color: #e1306c; }

.map-card:hover { border-color: #64748b; }
.map-card .card-icon { color: #94a3b8; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    padding: 15px; /* Reduzi um pouco para mobile */
    overflow-y: auto; /* Permite rolar o fundo se necessário */
}

.modal-content {
    background: #1e293b;
    border: 1px solid var(--card-border);
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
    animation: modal-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh; /* Não deixa passar da altura da tela */
    overflow-y: auto; /* Habilita scroll dentro do modal se o form for grande */
}

@keyframes modal-in {
    from { opacity: 0; transform: scale(0.8) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px; /* Maior para facilitar o toque */
    color: #94a3b8;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.close-btn:hover { color: white; }

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--success-color);
}

.modal-header p {
    color: #94a3b8;
    font-size: 0.85rem;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
    -webkit-appearance: none; /* Remove estilos padrão do iOS */
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--success-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-group select option {
    background: #1e293b;
    color: white;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--success-color);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 5px;
    box-shadow: 0 10px 20px rgba(56, 176, 0, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    background: #2d8a00;
    box-shadow: 0 15px 30px rgba(56, 176, 0, 0.3);
}

/* Footer */
.footer {
    padding: 25px 20px;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: auto;
}

/* Responsiveness */
@media (max-width: 480px) {
    .header { padding: 30px 15px; }
    .header h1 { font-size: 1.3rem; }
    .logo { max-width: 180px; }
    
    .container { margin: 20px auto; }
    
    .link-card { padding: 15px 20px; border-radius: 16px; }
    .card-icon { width: 42px; height: 42px; font-size: 1.3rem; margin-right: 15px; }
    .card-content h3 { font-size: 0.95rem; }
    .card-content p { font-size: 0.8rem; }
    
    .modal-content { 
        padding: 30px 20px; 
        border-radius: 20px;
        width: 95%;
    }
    
    .admin-container { padding: 20px 15px; margin: 15px auto; }
    table { font-size: 0.8rem; }
    th, td { padding: 10px 8px; }
    .btn-logout { padding: 6px 12px; font-size: 0.7rem; }
}