* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    overflow-x: hidden;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* Animações */
.page-transition { animation: fadeSlideUp 0.4s ease-out forwards; }
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7); } 70% { box-shadow: 0 0 0 15px rgba(var(--primary-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0); } }
@keyframes spin { 100% { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; display: inline-block; }

/* Header do App */
.app-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 65px;
    background-color: var(--cor-header);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 15px; z-index: 1000; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.app-header .menu-btn { background: none; border: none; color: var(--cor-texto); font-size: 2rem; cursor: pointer; display: flex; align-items: center; }
.app-header .logo img { max-height: 40px; }
.app-header .logo h2 { font-size: 1.2rem; color: var(--cor-texto); margin: 0; }
.app-header .balance {
    background: rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 20px;
    display: flex; align-items: center; gap: 5px; font-weight: bold; font-size: 0.9rem; border: 1px solid rgba(255,255,255,0.15);
}

/* Container Principal */
.app-container { padding: 85px 15px 30px; max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }

/* Botões de Ação (Sacar / Depositar) */
.action-buttons { display: flex; gap: 10px; width: 100%; }
.btn-action {
    flex: 1; padding: 12px; border-radius: 10px; border: none; font-weight: bold; font-size: 1rem;
    display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: #fff;
}
.btn-deposit { background: #10b981; box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); }
.btn-withdraw { background: #f43f5e; box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3); }

/* =========================================
   CARD JOGAR (Página Inicial)
========================================= */
.card-jogar {
    display: block;
    position: relative;
    width: 100%;
    min-height: 180px;
    border-radius: 16px;
    background: url('../img/jogar.png') center center / cover no-repeat;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-jogar:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
}
.card-jogar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}
.card-jogar-content {
    position: relative;
    z-index: 2;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}
.card-jogar-content h2 { color: #fff; font-size: 1.8rem; margin-bottom: 5px; font-weight: 800; text-transform: uppercase; }
.card-jogar-content p { color: rgba(255,255,255,0.9); font-size: 0.95rem; margin-bottom: 15px; font-weight: 500; line-height: 1.4; max-width: 85%; }
.card-jogar-btn {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--primary-color); color: #fff; text-transform: uppercase;
    font-weight: 900; font-size: 1rem; padding: 10px 25px; border-radius: 30px;
    box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-color) 50%, transparent);
    animation: pulseGlow 2s infinite;
}

/* =========================================
   MÓDULO DE APOSTA (apostar/index.php)
========================================= */
.apostar-bg { position: relative; width: 100%; min-height: 60vh; border-radius: 16px; background: url('../img/jogar.png') center center/cover no-repeat; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.apostar-bg::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); z-index: 1; }
.apostar-card { position: relative; z-index: 2; background: linear-gradient(135deg, #e0f2fe 0%, #ffffff 100%); width: 100%; max-width: 450px; padding: 40px 30px; border-radius: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.5); text-align: center; }
.apostar-card h2 { color: #0284c7; font-size: 2rem; margin-bottom: 10px; font-weight: 800; }
.apostar-card p { color: #475569; font-size: 1.05rem; margin-bottom: 25px; font-weight: 500; }
.btn-voltar { display: inline-flex; align-items: center; gap: 8px; background: #0ea5e9; color: #ffffff; padding: 12px 24px; border-radius: 30px; font-weight: bold; text-transform: uppercase; transition: all 0.3s ease; }
.btn-voltar:hover { background: #0284c7; transform: translateY(-2px); }

/* =========================================
   FAQ / SANFONA (Accordion)
========================================= */
.faq-container { margin-top: 30px; background: var(--cor-boxes); padding: 25px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.05); }
.faq-title { color: #fff; font-size: 1.3rem; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.faq-title .iconify { color: var(--primary-color); }
.accordion { display: flex; flex-direction: column; gap: 10px; }
.accordion-item { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; }
.accordion-header { width: 100%; background: none; border: none; padding: 15px 20px; text-align: left; color: #fff; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.3s; }
.accordion-header:hover { background: rgba(255,255,255,0.05); }
.accordion-header::after { content: '\25BC'; font-size: 0.8rem; transition: transform 0.3s ease; color: var(--primary-color); }
.accordion-header.active::after { transform: rotate(-180deg); }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; background: rgba(0,0,0,0.1); }
.accordion-content p { padding: 15px 20px; color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.5; margin: 0; }

/* Mini Abas Grid */
.mini-boxes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.mini-box {
    background: var(--cor-boxes); border-radius: 12px; padding: 15px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05); transition: transform 0.2s;
}
.mini-box:active { transform: scale(0.96); }
.mini-box .iconify { font-size: 2.5rem; color: var(--primary-color); }
.mini-box span:last-child { font-weight: 600; font-size: 0.95rem; }

/* Sidebar Menu Mobile */
.app-sidebar {
    position: fixed; top: 0; left: -300px; width: 280px; height: 100vh;
    background: var(--cor-header); z-index: 1002; transition: left 0.3s ease;
    display: flex; flex-direction: column; border-right: 1px solid rgba(255,255,255,0.05);
}
.app-sidebar.open { left: 0; }
.sidebar-user { padding: 30px 20px; background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.05); text-align: center; }
.sidebar-user .iconify { font-size: 4rem; color: var(--primary-color); margin-bottom: 10px; }
.sidebar-user h3 { font-size: 1.2rem; margin-bottom: 5px; }
.app-sidebar-nav { list-style: none; padding: 15px 0; flex-grow: 1; overflow-y: auto; }
.app-sidebar-nav li a { display: flex; align-items: center; gap: 15px; padding: 15px 20px; font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,0.02); }
.app-sidebar-nav li a .iconify { font-size: 1.5rem; color: var(--primary-color); }

/* Mobile Bottom Nav (App Style) */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; background: var(--cor-header);
    display: flex; justify-content: space-around; align-items: center; height: 65px;
    z-index: 999; border-top: 1px solid rgba(255,255,255,0.05);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.3);
}
.bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.5); font-size: 0.75rem; flex: 1; height: 100%; transition: color 0.3s;
    font-weight: 600;
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary-color); }
.bottom-nav a .iconify { font-size: 1.5rem; margin-bottom: 3px; }
@media(min-width: 768px) { .bottom-nav { display: none !important; } }
@media(max-width: 767px) { body { padding-bottom: 80px !important; } }

/* Overlay */
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1001; opacity: 0; visibility: hidden; transition: opacity 0.3s; backdrop-filter: blur(3px); }
.overlay.show { opacity: 1; visibility: visible; }

/* Modais Bottom Sheet */
.app-modal {
    position: fixed; bottom: -100%; left: 0; width: 100%;
    background: var(--cor-boxes); z-index: 1003; border-radius: 20px 20px 0 0;
    padding: 25px; transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}
.app-modal.open { bottom: 0; }
.modal-drag { width: 40px; height: 5px; background: rgba(255,255,255,0.2); border-radius: 10px; margin: 0 auto 20px; }
.modal-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 15px; text-align: center; }
.modal-input { width: 100%; padding: 15px; border-radius: 10px; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); color: #fff; font-size: 1.1rem; margin-bottom: 15px; outline: none; }
.modal-input:focus { border-color: var(--primary-color); }
.btn-modal {
    width: 100%; padding: 15px; border-radius: 30px; border: none; color: #fff;
    font-size: 1.1rem; font-weight: bold; text-transform: uppercase; cursor: pointer;
    transition: transform 0.2s;
}
.btn-modal:hover { transform: translateY(-2px); }

/* Centraliza no Desktop */
@media(min-width: 768px) {
    .app-modal { 
        width: 400px; left: 50%; bottom: auto; top: 50%; transform: translate(-50%, -50%) scale(0.9);
        border-radius: 16px; opacity: 0; visibility: hidden; transition: all 0.3s ease;
    }
    .app-modal.open { top: 50%; transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; bottom: auto; }
    .modal-drag { display: none; }
}

/* Esconde scrollbar nativa */
::-webkit-scrollbar { width: 0px; background: transparent; }
