/* ============================================
   HM PLAY - DESIGN COMPLETO (DARK PREMIUM)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #09090b;
    /* Quase preto absoluto */
    --bg-card: #121214;
    /* Cinza muito escuro */
    --bg-card-alt: #1c1c1f;
    --bg-hover: #27272a;

    --primary: #00ff88;
    --primary-glow: rgba(0, 255, 136, 0.2);
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;

    --brasil: #009c3b;
    --sulamericana: #facc15;
    --europa: #3b82f6;
    --selecoes: #a855f7;

    --text-white: #ffffff;
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;

    --border: #27272a;
    --border-light: #3f3f46;

    --radius: 12px;
    --radius-lg: 16px;

    /* Compatibilidade */
    --primary-color: var(--primary);
    --bg-color: var(--bg-dark);
    --card-bg: var(--bg-card);
    --text-color: var(--text-primary);
    --border-color: var(--border);
    --accent-red: var(--danger);
    --live-color: var(--danger);
}

/* Proteção contra seleção e cópia */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER */
.header {
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--success) 0%, #2ea043 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px var(--success-glow);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-white);
}

.logo-slogan {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(248, 81, 73, 0.15);
    border: 1px solid rgba(248, 81, 73, 0.4);
    padding: 8px 16px;
    border-radius: 50px;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.live-count {
    font-size: 1rem;
    font-weight: 700;
    color: var(--danger);
}

.live-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--danger);
}

/* HERO */
.hero {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 100%);
    padding: 30px 0 20px;
    text-align: center;
}

.hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 5px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.date-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.date-btn {
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-btn:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.date-btn.active {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}

/* CATEGORIES */
.categories-section {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}

.category-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.category-tab {
    background: var(--bg-card-alt);
    border: 2px solid transparent;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.category-tab:hover {
    background: var(--bg-hover);
    color: var(--text-white);
}

.category-tab.active {
    background: var(--bg-dark);
    border-color: var(--primary);
    color: var(--text-white);
}

.category-tab[data-category="brasil"].active {
    border-color: var(--brasil);
}

.category-tab[data-category="sulamericana"].active {
    border-color: var(--sulamericana);
}

.category-tab[data-category="europa"].active {
    border-color: var(--europa);
}

.category-tab[data-category="selecoes"].active {
    border-color: var(--selecoes);
}

/* SUBCATEGORIES */
.subcategory-filters {
    display: none;
}

.subcategory-group {
    display: none;
    gap: 6px;
    flex-wrap: wrap;
}

.subcategory-group.active {
    display: flex;
}

.sub-filter {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sub-filter:hover {
    color: var(--text-primary);
    border-color: var(--border-light);
}

.sub-filter.active {
    background: var(--primary);
    color: var(--bg-dark);
    border-color: var(--primary);
}

/* MAIN */
.main {
    padding: 25px 0;
    min-height: 50vh;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    gap: 15px;
}

.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--text-secondary);
}

.message-box {
    text-align: center;
    padding: 60px 20px;
}

.message-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.message-box h3 {
    font-size: 1.2rem;
    color: var(--text-white);
    margin-bottom: 8px;
}

.message-box p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-retry {
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

/* GAMES */
.games-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.league-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.league-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card-alt);
    border-bottom: 1px solid var(--border);
}

.league-group-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-dark);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.league-group-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.league-group-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-white);
    flex: 1;
}

.league-group-count {
    background: var(--bg-dark);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* GAME ROW */
.game-row {
    display: grid;
    grid-template-columns: 70px 1fr 70px 1fr 90px;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.game-row:last-child {
    border-bottom: none;
}

.game-row:hover {
    background: var(--bg-hover);
}

.game-row.live {
    background: rgba(248, 81, 73, 0.08);
}

.game-time {
    text-align: center;
}

.game-time-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-white);
}

.game-time-value.live {
    color: var(--danger);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.game-time-status {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.game-time-status.live {
    color: var(--danger);
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team.home {
    justify-content: flex-end;
    text-align: right;
}

.team.away {
    justify-content: flex-start;
    text-align: left;
}

.team-logo {
    width: 48px;
    /* Increased from 32px */
    height: 48px;
    background: transparent;
    /* Remove square bg to show raw logo better */
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    flex-shrink: 0;
}

.team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.team-logo-fallback {
    font-size: 1.5rem;
}

.team-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.game-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.score-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-white);
    min-width: 20px;
    text-align: center;
}

.score-separator {
    color: var(--text-muted);
}

.game-channel {
    text-align: center;
}

.channel-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* FOOTER */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* RESPONSIVE */
@media (max-width: 800px) {
    .game-row {
        grid-template-columns: 55px 1fr 55px 1fr;
        gap: 8px;
        padding: 12px;
    }

    .game-channel {
        display: none;
    }

    .team-name {
        max-width: 100px;
        font-size: 0.8rem;
    }
}

@media (max-width: 500px) {
    .logo-text {
        display: none;
    }

    .hero h1 {
        font-size: 1.4rem;
    }

    .date-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .category-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .game-row {
        grid-template-columns: 50px 1fr 50px 1fr;
    }

    .team-logo {
        width: 28px;
        height: 28px;
    }

    .team-name {
        max-width: 70px;
        font-size: 0.75rem;
    }

    .score-value {
        font-size: 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.category-tabs::-webkit-scrollbar,
.subcategory-group::-webkit-scrollbar {
    display: none;
}

.category-tabs,
.subcategory-group {
    scrollbar-width: none;
}

/* ============================================
   POPUP DE CADASTRO - PREMIUM DESIGN
   ============================================ */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

.popup-overlay.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.popup-container {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 24px;
    padding: 40px 35px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 255, 136, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
    transform: rotate(90deg);
}

.popup-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.popup-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 12px;
    background: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.popup-description strong {
    color: var(--primary);
}

.popup-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    text-align: left;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 12px;
    padding: 15px 20px;
}

.popup-benefits li {
    font-size: 0.88rem;
    color: var(--text-primary);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-btn {
    display: inline-block;
    width: 100%;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #0a0a0a;
    font-size: 1rem;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(0, 255, 136, 0.3);
    position: relative;
    overflow: hidden;
}

.popup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.popup-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.4);
}

.popup-btn:hover::before {
    left: 100%;
}

.popup-footer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 15px;
}

/* Responsive Popup */
@media (max-width: 500px) {
    .popup-container {
        padding: 30px 25px;
        border-radius: 20px;
    }

    .popup-icon {
        font-size: 3rem;
    }

    .popup-title {
        font-size: 1.5rem;
    }

    .popup-description {
        font-size: 0.88rem;
    }

    .popup-benefits li {
        font-size: 0.82rem;
    }

    .popup-btn {
        font-size: 0.95rem;
        padding: 14px 20px;
    }
}