/* callmap/css/style.css */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Verdana', sans-serif;
    background-color: #121212;
    background-image: url('../../settings/bg.jpg'); 
    background-size: cover;
    background-attachment: fixed;
    color: #fff;
    display: flex; flex-direction: column; min-height: 100vh;
}

.main-content-area { 
    margin-top: 40px; padding-bottom: 40px; flex: 1; width: 100%;
}

.container {
    width: 95%; max-width: 1400px; margin: 0 auto;
    background: rgba(15, 15, 15, 0.95);
    border-radius: 12px; padding: 30px;
    border: 2px solid #ff5000;  
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    margin: 40px auto;
}

.section-header { 
    margin-bottom: 30px; border-bottom: 1px solid #333; padding-bottom: 15px; text-align: center;
}
.section-header h2 { color: #ff5000; margin-bottom: 5px; font-size: 24px; text-transform: uppercase; }
.section-header p { color: #888; font-size: 13px; }

/* --- GRID DE MAPAS --- */
.maps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.map-card { background: #1a1a1a; border: 1px solid #333; border-radius: 8px; overflow: hidden; transition: 0.3s; text-decoration: none; color: white; display: flex; flex-direction: column; position: relative; }
.map-card:hover { transform: translateY(-5px); border-color: #ff5000; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.map-thumb-wrapper { position: relative; width: 100%; height: 140px; background: #000; border-bottom: 1px solid #333; }
.map-thumb { width: 100%; height: 100%; object-fit: cover; }
.map-icon-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(45deg, #222, #333); color: #ff5000; font-size: 50px; }
.map-badges { position: absolute; bottom: 5px; right: 5px; display: flex; gap: 5px; }
.badge { background: rgba(0,0,0,0.8); padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; display: flex; align-items: center; gap: 4px; border: 1px solid rgba(255,255,255,0.1); }
.badge-star { color: #ffc107; }
.badge-heart { color: #ff5000; }
.map-info { padding: 12px; text-align: center; }
.map-name { font-weight: bold; font-size: 13px; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card:hover .map-name { color: #ff5000; }

/* --- PERFIL DO MAPA (MAPINFO) --- */
.map-profile-header { display: flex; gap: 30px; margin-bottom: 40px; flex-wrap: wrap; }

.map-thumb-container {
    position: relative;
    width: 400px;
    height: 250px;
    flex-shrink: 0;
}

.map-profile-img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 2px solid #ff5000;
    background: #000; cursor: pointer; transition: 0.2s;
}

.map-thumb-container:hover .map-profile-img {
    border-color: #ff7020;
}

.expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: 0.2s;
}

.map-thumb-container:hover .expand-btn {
    opacity: 1;
}

.expand-btn:hover {
    background: #ff5000;
    border-color: #ff5000;
    transform: scale(1.1);
}

.map-profile-details { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* --- MODAL DE IMAGEM EXPANDIDA --- */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.image-modal-overlay.show {
    display: flex;
}

.image-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: calc(95vh - 60px);
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #ff5000;
    box-shadow: 0 0 50px rgba(255, 80, 0, 0.3);
}

.image-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: #ff5000;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: 0.2s;
    z-index: 1;
}

.image-modal-close:hover {
    background: #ff7020;
    transform: scale(1.1);
}

.image-modal-title {
    margin-top: 15px;
    font-size: 18px;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.map-title-large { font-size: 32px; font-weight: bold; color: #fff; margin-bottom: 20px; }

.action-bar { display: flex; gap: 15px; margin-top: 20px; align-items: center; flex-wrap: wrap; }

.btn-download {
    background: #ff5000; color: white; padding: 12px 25px; border-radius: 5px;
    text-decoration: none; font-weight: bold; display: flex; align-items: center; gap: 10px;
    transition: 0.2s; border: none; cursor: pointer;
}
.btn-download:hover { background: #ff7700; transform: scale(1.05); }

/* BOTÕES DE VOTAÇÃO (NOVOS) */
.btn-vote-action {
    background: #444; /* Cinza para desativado */
    color: #ccc;
    padding: 12px 25px; 
    border-radius: 5px;
    border: none;
    cursor: not-allowed;
    display: flex; align-items: center; gap: 10px;
    font-weight: bold;
    transition: 0.2s;
}
.btn-vote-action.btn-nominate { background: #005691; color: white; border: 1px solid #005691; }
.btn-vote-action.btn-vote { background: #28a745; color: white; }

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    transform: none !important;
}
.btn-disabled:hover {
    background: #444;
}

.btn-back {
    display: inline-flex; align-items: center; gap: 8px; color: #aaa; text-decoration: none;
    margin-bottom: 20px; font-size: 14px; transition: 0.2s;
}
.btn-back:hover { color: #fff; transform: translateX(-5px); }

/* Rating e Fav */
.rating-box { font-size: 24px; color: #444; margin-bottom: 10px; }
.rating-interactive { cursor: pointer; transition: 0.2s; }
.rating-interactive.selected { color: #ffc107; }
.rating-interactive:hover { color: #ffc107; }

.fav-btn {
    background: #222; border: 1px solid #444; color: #888; padding: 10px 20px;
    border-radius: 5px; cursor: pointer; display: flex; align-items: center; gap: 8px;
    font-weight: bold; transition: 0.2s;
}
.fav-btn.active { color: #ff5000; border-color: #ff5000; background: rgba(255, 80, 0, 0.1); }
.fav-btn:hover { background: #333; }

/* Comentários - estilos básicos (detalhes em /lib/css/global.css) */
.comments-section { border-top: 1px solid #333; padding-top: 30px; margin-top: 20px; }
/* Os estilos de .comment-input-area estão em /lib/css/global.css */

/* --- MODAL CUSTOMIZADO (Alert/Confirm) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 9999;
    display: none; justify-content: center; align-items: center;
}
.modal-box {
    background: #1a1a1a; border: 2px solid #ff5000; border-radius: 10px;
    padding: 25px; width: 90%; max-width: 400px; text-align: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.8); animation: popIn 0.2s ease-out;
}
.modal-title { font-size: 18px; color: #ff5000; font-weight: bold; margin-bottom: 10px; }
.modal-text { font-size: 14px; color: #ddd; margin-bottom: 20px; line-height: 1.4; }
.modal-actions button {
    background: #ff5000; color: white; border: none; padding: 10px 25px;
    border-radius: 5px; font-weight: bold; cursor: pointer; transition: 0.2s; margin: 0 5px;
}
.modal-actions button:hover { background: #ff7700; transform: scale(1.05); }

/* Responsivo */
@media (max-width: 900px) {
    .map-profile-header { flex-direction: column; }
    .map-thumb-container { width: 100%; height: auto; }
    .map-profile-img { width: 100%; height: auto; min-height: 200px; }
}

/* ========================================
   DROPDOWN DE BUSCA DE MAPAS (MAPINFO)
   Adicionar no FINAL do style.css
   ======================================== */

.maps-search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(15, 15, 15, 0.98);
    border: 2px solid #ff5000;
    border-radius: 10px;
    max-height: 500px;
    overflow-y: auto;
    display: none;
    z-index: 10001;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
}

.maps-search-dropdown.show {
    display: block;
}

.maps-search-dropdown::-webkit-scrollbar {
    width: 8px;
}

.maps-search-dropdown::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.maps-search-dropdown::-webkit-scrollbar-thumb {
    background: #ff5000;
    border-radius: 4px;
}

.maps-search-results {
    padding: 10px;
}

.maps-search-empty {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.maps-search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    margin-bottom: 8px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s;
}

.maps-search-item:hover {
    background: #222;
    border-color: #ff5000;
    transform: translateX(5px);
}

.maps-search-thumb {
    width: 80px;
    height: 50px;
    border-radius: 5px;
    object-fit: cover;
    border: 1px solid #444;
    flex-shrink: 0;
}

.maps-search-thumb-placeholder {
    width: 80px;
    height: 50px;
    border-radius: 5px;
    background: linear-gradient(45deg, #222, #333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5000;
    font-size: 24px;
    flex-shrink: 0;
}

.maps-search-info {
    flex: 1;
    min-width: 0;
}

.maps-search-name {
    font-size: 14px;
    font-weight: bold;
    color: #ddd;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.maps-search-item:hover .maps-search-name {
    color: #ff5000;
}

.maps-search-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.maps-search-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.maps-search-stat i {
    font-size: 11px;
}

.maps-search-stat.rating {
    color: #ffc107;
}

.maps-search-stat.favs {
    color: #ff5000;
}

/* Ajuste para o nav-search ter posição relativa (necessário para o dropdown) */
.nav-search {
    position: relative;
}

/* Loading no dropdown */
.maps-search-loading {
    padding: 30px 20px;
    text-align: center;
    color: #888;
}

.maps-search-loading i {
    font-size: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsivo */
@media (max-width: 768px) {
    .maps-search-dropdown {
        max-height: 400px;
    }
    
    .maps-search-item {
        gap: 10px;
        padding: 10px;
    }
    
    .maps-search-thumb,
    .maps-search-thumb-placeholder {
        width: 60px;
        height: 40px;
    }
    
    .maps-search-name {
        font-size: 13px;
    }
}

/* ========================================
   SEÇÃO DE RANK NO MAPINFO
   ======================================== */

.map-rank-section {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.map-rank-section .section-title {
    color: #ff5000;
    font-size: 20px;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-rank-section .section-title i {
    color: #ffc107;
}

/* Estatísticas Gerais do Mapa */
.map-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.map-stat-card {
    background: rgba(255, 80, 0, 0.1);
    border: 1px solid rgba(255, 80, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.map-stat-card:hover {
    border-color: #ff5000;
    transform: translateY(-2px);
}

.map-stat-card .stat-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ff5000 0%, #ff8000 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.map-stat-card .stat-info {
    flex: 1;
}

.map-stat-card .stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.map-stat-card .stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Tabela de Top Players */
.top-players-table {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.top-players-table .table-header {
    display: grid;
    grid-template-columns: 60px 1fr 80px 80px 70px 70px 90px;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 80, 0, 0.15);
    border-bottom: 1px solid #333;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
}

.top-players-table .table-row {
    display: grid;
    grid-template-columns: 60px 1fr 80px 80px 70px 70px 90px;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid #222;
    transition: all 0.2s;
    cursor: pointer;
}

.top-players-table .table-row:last-child {
    border-bottom: none;
}

.top-players-table .table-row:hover {
    background: rgba(255, 80, 0, 0.1);
}

.top-players-table .table-row.top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, transparent 100%);
}

.top-players-table .table-row.top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1) 0%, transparent 100%);
}

.top-players-table .table-row.top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1) 0%, transparent 100%);
}

.col-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #888;
}

.rank-medal {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.rank-medal.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-medal.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
    color: #000;
}

.rank-medal.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
    color: #fff;
}

.col-player {
    display: flex;
    align-items: center;
}

.player-name {
    font-size: 14px;
    color: #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-row:hover .player-name {
    color: #ff5000;
}

.col-kills, .col-deaths, .col-kd, .col-hs, .col-skill {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #ccc;
}

.col-kills {
    color: #27ae60;
    font-weight: 600;
}

.col-deaths {
    color: #e74c3c;
}

.col-kd.positive {
    color: #27ae60;
    font-weight: 600;
}

.col-kd.negative {
    color: #e74c3c;
}

.col-hs {
    color: #f1c40f;
}

.col-skill {
    color: #3498db;
    font-weight: 600;
}

/* View Full Rank Button */
.view-full-rank {
    text-align: center;
    margin-top: 20px;
}

.btn-view-rank {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #ff5000 0%, #ff8000 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-view-rank:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 80, 0, 0.4);
}

/* Empty State */
.map-rank-section.empty {
    text-align: center;
}

.no-rank-data {
    padding: 40px 20px;
}

.no-rank-data i {
    font-size: 48px;
    color: #444;
    margin-bottom: 15px;
}

.no-rank-data p {
    font-size: 16px;
    color: #888;
    margin: 0 0 10px 0;
}

.no-rank-data span {
    font-size: 13px;
    color: #ff5000;
    font-style: italic;
}

/* Responsivo */
@media (max-width: 900px) {
    .top-players-table .table-header,
    .top-players-table .table-row {
        grid-template-columns: 50px 1fr 60px 60px 50px 50px;
    }
    
    .col-skill {
        display: none;
    }
    
    .top-players-table .table-header .col-skill {
        display: none;
    }
}

@media (max-width: 600px) {
    .map-stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .top-players-table .table-header,
    .top-players-table .table-row {
        grid-template-columns: 40px 1fr 50px 50px;
        font-size: 12px;
    }
    
    .col-kd, .col-hs, .col-skill {
        display: none;
    }
    
    .top-players-table .table-header .col-kd,
    .top-players-table .table-header .col-hs,
    .top-players-table .table-header .col-skill {
        display: none;
    }
    
    .map-stat-card {
        padding: 12px;
    }
    
    .map-stat-card .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .map-stat-card .stat-value {
        font-size: 18px;
    }
}