/**
 * LoteriaPro - Estilos Responsivos
 * Mobile First Design
 */

/* ========== MOBILE FIRST (< 768px) ========== */
/* Estilos base já estão em style.css */

/* Ajustes específicos para mobile */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }

    .container {
        padding: 0 1rem;
    }

    /* Colunas em mobile = 100% */
    .col,
    .col-2,
    .col-3,
    .col-4,
    .col-6,
    .col-8,
    .col-9,
    .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .card {
        padding: 1rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Tabelas responsivas */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

    /* Menu mobile */
    .navbar-toggler {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: 1rem;
        flex-direction: column;
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--gray-100);
    }

    /* Grid de jogos */
    .jogos-grid {
        grid-template-columns: 1fr;
    }

    /* Números da loteria */
    .numero-loteria {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }

    /* Estatísticas */
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== TABLET (768px - 1023px) ========== */
@media (min-width: 768px) {
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }

    .navbar-toggler {
        display: none;
    }

    .navbar-menu {
        display: flex;
        flex-direction: row;
    }

    /* Grid de jogos */
    .jogos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Estatísticas */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== DESKTOP (1024px+) ========== */
@media (min-width: 1024px) {
    .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
    .col-lg-12 { flex: 0 0 100%; max-width: 100%; }

    /* Grid de jogos */
    .jogos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Estatísticas */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Sidebar fixa */
    .app-layout {
        display: grid;
        grid-template-columns: 250px 1fr;
        min-height: 100vh;
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }
}

/* ========== WIDE SCREEN (1440px+) ========== */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    /* Grid de jogos */
    .jogos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== COMPONENTES RESPONSIVOS ========== */

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-toggler {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-700);
    padding: 0.5rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar-menu a {
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.navbar-menu a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 0;
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 8rem 0;
    }
}

/* Grid de Números */
.numeros-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .numeros-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (min-width: 1024px) {
    .numeros-grid {
        grid-template-columns: repeat(13, 1fr);
    }
}

/* Número da Loteria */
.numero-loteria {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--gray-300);
    background: white;
}

@media (min-width: 768px) {
    .numero-loteria {
        width: 50px;
        height: 50px;
    }
}

.numero-loteria:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.numero-loteria.selected {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary);
}

.numero-loteria.quente {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
    border-color: #ef4444;
}

.numero-loteria.frio {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    border-color: #3b82f6;
}

/* Card de Planos */
.planos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .planos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .planos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.plano-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 2px solid transparent;
}

.plano-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.plano-card.destaque {
    border-color: var(--primary);
    position: relative;
}

.plano-card.destaque::before {
    content: 'MAIS POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--gray-500);
    margin: 0;
    font-size: 0.875rem;
}

/* Jogos Grid */
.jogos-grid {
    display: grid;
    gap: 1.5rem;
}

.jogo-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.jogo-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilitários Responsivos */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 768px) {
    .show-mobile { display: none !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hide-tablet { display: none !important; }
}

@media (min-width: 1024px) {
    .hide-desktop { display: none !important; }
}