/* ========== NOVO LAYOUT - HEADER, GRID 3 COLUNAS, FOOTER ========== */

/* Main Header */
.main-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo-section .brand-name {
    font-size: 1.8rem;
    margin: 0;
}

/* Search Section */
.search-section {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    max-width: 600px;
}

.search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.search-input option {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 10px;
}

#lotterySelect {
    flex: 1;
    min-width: 180px;
}

#contestNumber {
    width: 140px;
}

/* User Controls */
.user-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
}

#userProfile {
    display: flex;
    align-items: center;
    gap: 10px;
}

#userNameDisplay {
    color: #fff;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Results Section */
.results-section {
    width: 100%;
    padding: 3rem 0;
}

.results-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, var(--primary-color) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Grid 3 Colunas */
.results-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
}

/* Footer */
.main-footer {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-column p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* Floating Action Button */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 90;
}

.fab-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 255, 136, 0.6);
}

/* Ajustes para body */
body {
    align-items: flex-start;
    padding-top: 0;
}

#mainContent {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .results-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
    }

    .logo-section {
        text-align: center;
    }

    .search-section {
        flex-direction: column;
        max-width: 100%;
    }

    .search-input,
    #lotterySelect,
    #contestNumber {
        width: 100%;
    }

    .user-controls {
        justify-content: center;
    }

    .results-grid-3col {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .results-container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .floating-actions {
        bottom: 20px;
        right: 20px;
    }

    .fab-button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo-section .brand-name {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .footer-column h3 {
        font-size: 1rem;
    }
}

/* Ajuste para esconder elementos antigos */
.hero {
    display: none !important;
}

.main-footer {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-column p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

/* Floating Action Button */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 90;
}

.fab-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

.fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 255, 136, 0.6);
}

/* Ajustes para body */
body {
    align-items: flex-start;
    padding-top: 0;
}

#mainContent {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .results-grid-3col {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
    }

    .logo-section {
        text-align: center;
    }

    .search-section {
        flex-direction: column;
        max-width: 100%;
    }

    .search-input,
    #lotterySelect,
    #contestNumber {
        width: 100%;
    }

    .user-controls {
        justify-content: center;
    }

    .results-grid-3col {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .results-container {
        padding: 0 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .floating-actions {
        bottom: 20px;
        right: 20px;
    }

    .fab-button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo-section .brand-name {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .footer-column h3 {
        font-size: 1rem;
    }
}

/* Ajuste para esconder elementos antigos */
.hero {
    display: none !important;
}

.dashboard-header {
    display: none !important;
}

.back-button {
    display: none !important;
}

/* ========== MODAL DE TERMOS DE USO ========== */

/* Modal de Termos de Uso */
.terms-modal {
    max-width: 700px;
    max-height: 85vh;
}

.terms-content {
    max-height: 55vh;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Scrollbar personalizada para o conteúdo dos termos */
.terms-content::-webkit-scrollbar {
    width: 8px;
}

.terms-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.terms-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.terms-content h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.terms-content h3:first-child {
    margin-top: 0;
}

.terms-content p,
.terms-content ul {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.terms-content ul {
    padding-left: 1.5rem;
}

.terms-content li {
    margin-bottom: 0.5rem;
}

.terms-content .warning-box {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.terms-content .warning-box h3 {
    color: #ffc107;
    margin-top: 0;
}

.terms-content .info-box {
    background: rgba(0, 255, 136, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.terms-content .info-box h3 {
    margin-top: 0;
}

.terms-actions {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Bloquear interação com conteúdo quando termos não aceitos */
#mainContent.blocked {
    pointer-events: none;
    filter: blur(5px);
    user-select: none;
    opacity: 0.6;
}

/* Garantir que modal de termos fique acima de tudo */
#termsModal {
    z-index: 10000 !important;
}

#termsModal .modal-content {
    pointer-events: all;
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .terms-modal {
        max-width: 95%;
        max-height: 90vh;
    }

    .terms-content {
        max-height: 60vh;
        padding: 1rem;
    }

    .terms-content h3 {
        font-size: 1rem;
    }
}

/* ========== MODAL DE RESULTADOS - ESTILO MOBILE MODERNO ========== */

/* Modal Navigation - Estilo Mobile Atraente */
.modal-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem;
}

.nav-btn {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 200, 255, 0.15));
    border: 2px solid rgba(0, 255, 136, 0.3);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-btn:hover::before {
    width: 100px;
    height: 100px;
}

.nav-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.4);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: none;
    box-shadow: none;
}

.nav-btn:disabled:hover {
    transform: none;
}

#modalContest {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    flex: 1;
    padding: 0.5rem;
    background: rgba(0, 255, 136, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

/* Responsivo Mobile para Modal Navigation */
@media (max-width: 768px) {
    .nav-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    #modalContest {
        font-size: 1rem;
    }
    
    .modal-navigation {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    #modalContest {
        font-size: 0.9rem;
        padding: 0.4rem;
    }
}


/* ========== HEADER RESPONSIVO - ESTILO MOBILE MODERNO ========== */

/* Brand Tagline */
.brand-tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
    font-weight: 300;
}

/* Search Section - Layout em Linhas */
.search-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.search-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Inputs Estilo Mobile */
.search-input.mobile-style {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-input.mobile-style:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* Botões de Ação - Estilo Mobile */
.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 2px solid;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
    width: 200px;
    height: 200px;
}

.btn-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.btn-text {
    font-family: var(--font-main);
}

/* Botão Primário */
.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.5);
}

/* Botão Secundário */
.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-color);
}

/* Botão de Câmera */
.camera-btn {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.2));
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffc107;
}

.camera-btn:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 152, 0, 0.3));
    border-color: #ffc107;
    transform: scale(1.05);
}

/* Botão de Login */
.login-btn {
    background: rgba(0, 200, 255, 0.15);
    border-color: rgba(0, 200, 255, 0.3);
    color: #00c8ff;
}

.login-btn:hover {
    background: rgba(0, 200, 255, 0.25);
    border-color: #00c8ff;
}

/* Botão de Logout */
.logout-btn {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff4444;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.logout-btn:hover {
    background: rgba(255, 68, 68, 0.25);
    border-color: #ff4444;
}

/* Responsivo Desktop */
@media (min-width: 1200px) {
    .search-row {
        flex-wrap: nowrap;
    }
    
    .search-actions {
        flex-wrap: nowrap;
    }
}

/* Responsivo Tablet */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .logo-section {
        text-align: center;
    }
    
    .search-section {
        width: 100%;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .search-input.mobile-style {
        width: 100%;
        min-width: auto;
    }
    
    .search-actions {
        justify-content: center;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: 100px;
    }
    
    .user-controls {
        justify-content: center;
    }
}

/* Responsivo Mobile */
@media (max-width: 480px) {
    .brand-name {
        font-size: 1.8rem;
    }
    
    .brand-tagline {
        font-size: 0.75rem;
    }
    
    .action-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    
    .btn-icon {
        font-size: 1.1rem;
    }
    
    .btn-text {
        display: none;
    }
    
    .action-btn {
        min-width: 50px;
        justify-content: center;
    }
}


/* ========== HEADER RETRÁTIL - AUTO-HIDE ========== */

/* Botão de Toggle */
.header-toggle-btn {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: 2px solid rgba(0, 255, 136, 0.3);
    color: #000;
    width: 50px;
    height: 35px;
    border-radius: 0 0 12px 12px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 101;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.header-toggle-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.5);
}

.toggle-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s;
}

/* Header Recolhido */
.main-header.collapsed {
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.collapsed .header-toggle-btn {
    bottom: -35px;
    transform: translateX(-50%) translateY(100%);
}

.main-header.collapsed .toggle-icon {
    transform: rotate(180deg);
}

/* Header Expandido ao Hover (quando recolhido) */
.main-header.collapsed.hover-expanded {
    transform: translateY(0);
}

/* Transição suave do header */
.main-header {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Ajuste para não sobrepor conteúdo */
.main-header + * {
    margin-top: 0;
    transition: margin-top 0.4s;
}

/* Mobile - Botão menor */
@media (max-width: 768px) {
    .header-toggle-btn {
        width: 40px;
        height: 30px;
        bottom: -30px;
    }
    
    .toggle-icon {
        font-size: 1rem;
    }
}
