/* app/static/css/style.css */
:root {
    --bg-dark: #0e0e12;
    --bg-panel: #232432;
    --bg-card: rgba(26, 26, 36, 0.95);

    --primary-color: #6943ff;
    --primary-gradient: linear-gradient(135deg, #6943ff 0%, #8b43ff 100%);
    --secondary-gradient: linear-gradient(135deg, #2d2e40 0%, #3a3b52 100%);

    --text-main: #ffffff;
    --text-muted: #8f90a6;

    --border-color: #2b2c40;
    --accent-glow: rgba(105, 67, 255, 0.5);
    --gold-accent: #ffffff;
    /* Oro eliminado, ahora blanco o violeta claro */
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    background-image: radial-gradient(circle at 50% 0%, #2a1a5e 0%, var(--bg-dark) 60%);
    min-height: 100vh;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: white;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Navbar & Containers */
.navbar {
    background-color: rgba(27, 26, 35, 0.95) !important;
    border-bottom: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px);
    z-index: 1050;
    /* Ensure it stays on top */
}

.card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card-header {
    background: linear-gradient(135deg, rgba(22, 22, 31, 0.8) 0%, rgba(58, 59, 82, 0.6) 100%);
    border-bottom: 1px solid var(--border-color);
    color: #a58aff;
    font-weight: 700;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

/* Special Text */
.hll-font {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    color: #8b43ff !important;
    text-shadow: 0 0 15px rgba(105, 67, 255, 0.3);
}

/* Tournament Result Views */
.reveal-match {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.match-revealed {
    opacity: 1;
    transform: translateY(0);
}

.match-box {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.match-revealed .match-box {
    background-color: rgba(105, 67, 255, 0.15) !important;
    border-color: var(--primary-color) !important;
    animation: glowPurple 0.5s ease-out;
}

@keyframes glowPurple {
    0% {
        box-shadow: 0 0 0px var(--primary-color);
    }

    50% {
        box-shadow: 0 0 20px var(--accent-glow);
    }

    100% {
        box-shadow: 0 0 0px var(--primary-color);
    }
}

.fade-in-list {
    animation: fadeInList 1s forwards ease-out;
}

@keyframes fadeInList {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.w-45 {
    width: 45%;
}

.w-40 {
    width: 40%;
}

.w-10 {
    width: 10%;
}

/* Banners de Mapas */
.map-banner {
    background-size: cover;
    background-position: center;
    border-left: 5px solid var(--primary-color);
    /* Cambiado a morado */
    min-height: 100px;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease;
    align-items: center;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Overlay gradiente sobre mapa para legibilidad */
.map-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(14, 14, 18, 0.85) 0%, rgba(14, 14, 18, 0.1) 100%);
    /* Reduced opacity for brighter images */
    z-index: 0;
}

.map-banner>div {
    position: relative;
    z-index: 1;
}

.faction-flag {
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
    transition: opacity 0.5s ease;
}

/* Ajustes para Round Robin */
.w-40 {
    width: 40%;
}

/* Clan List Styling */
.clan-list-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Centered content */
    transition: all 0.3s ease;
}

.clan-list-item:hover {
    transform: translateY(-3px);
    background-color: rgba(105, 67, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.clan-list-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 15px;
}

.clan-list-item span {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Print Styles */
@media print {

    .no-print,
    #skip-animation,
    .navbar {
        display: none !important;
    }

    .reveal-group,
    .reveal-clans-list,
    .reveal-match {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    body {
        background-color: white !important;
        color: black !important;
        background-image: none !important;
    }

    .card {
        background-color: white !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }

    .text-white {
        color: black !important;
    }

    .hll-font {
        color: black !important;
        text-shadow: none !important;
    }
}

/* Map Setup Thumbnails */
.map-thumb-container {
    position: relative;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.map-thumb-container:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(105, 67, 255, 0.3);
}

.map-thumb-input {
    top: 10px;
    left: 10px;
    z-index: 10;
    transform: scale(1.3);
    cursor: pointer;
}

.map-thumb-input:checked {
    background-color: #dc3545;
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 6l8 8m0-8l-8 8'/%3e%3c/svg%3e");
}

/* Optional: Dim container when excluded */
.map-thumb-container:has(.map-thumb-input:checked) .map-thumb-image {
    filter: grayscale(100%);
    opacity: 0.7;
}

.map-thumb-label {
    cursor: pointer;
    display: block;
    color: white;
    margin: 0;
}

.map-thumb-image {
    height: 50px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.map-thumb-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.9));
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    /* Centered vertically to align with checkbox */
    padding: 8px;
}

.map-thumb-name {
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 2.5rem;
    /* Increased space to clear checkbox */
    text-shadow: 1px 1px 2px black;
}