/* ============================================================
   1. CONFIGURAÇÕES GERAIS (RESET)
   ============================================================ */
* {
    box-sizing: border-box; /* Garante que padding não aumente o tamanho dos itens */
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
    padding-top: 80px; /* Espaço para a navbar fixa */
}

/* ============================================================
   2. NAVBAR (FLUIDA E MODERNA)
   ============================================================ */
.navbar {
    display: flex;
    justify-content: space-between; /* Espalha os itens pelas pontas */
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: #5170ff;
    color: white;
    padding: 0 5%; /* Respiro lateral dinâmico */
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.links {
    display: flex;
    gap: 20px;
}

.sign {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    transition: 0.3s;
}

/* ============================================================
   3. DECKBUILDER (LAYOUT 2 COLUNAS CENTRALIZADO)
   ============================================================ */
.deckbuilder-container {
    max-width: 1400px; /* Limite de largura para telas ultra-wide */
    margin: 0 auto;    /* Centraliza o container principal */
    padding: 20px;
}

.editor-area {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Divide a tela em duas metades iguais */
    gap: 30px;
    align-items: start;
}

/* Grids de Cartas */
.grid-cartas {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #e0e0e0;
    padding: 20px;
    border-radius: 12px;
    min-height: 500px;
    max-height: 70vh;
    overflow: visible;
    overflow-y: auto;
     /* Necessário para o zoom não cortar nas laterais */
}

/* ============================================================
   4. SISTEMA DE CARTAS E HOVER ZOOM (PEDIDO DO USUÁRIO)
   ============================================================ */
.card {
    position: relative;
    width: 110px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    
}

.card:hover {
    z-index: 100;          /* Garante que a carta fique acima de tudo */
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    cursor: pointer;
}

.card-img {
    width: 100%;
    /* border-radius: 8px; */
    display: block;
}

/* Contador de cartas dentro do deck */
.card-counter {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 14px;
    z-index: 101;
}

/* ============================================================
   5. GERENCIAMENTO E INTERFACE (UX)
   ============================================================ */
.management-menu {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.current-deck {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.deck-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 15px;
}

button {
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    background: #5170ff;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

button:hover {
    background: #3b5bdb;
    transform: translateY(-2px);
}

/* Indicador de Sincronia */
#sync-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

#zoom-overlay {
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    pointer-events: none; /* Importante para não bloquear eventos do mouse */
    transition: transform 0.1s ease-out; /* Suaviza o movimento */
    z-index: 9999; /* Garante que fique por cima */
}

#zoom-img {
    height: 80vh; /* A carta ocupa 80% da altura da tela */
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border: 5px solid white;
}

/* Classe para mostrar a div */
.zoom-active {
    display: flex !important;
    opacity: 1;
}