﻿/* =========================
   RESET / BASE
========================= */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: #0f172a;
    color: #e2e8f0;
}

/* =========================
   HEADER
========================= */
.tr_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #020617;
    border-bottom: 1px solid #1e293b;
    flex-wrap: wrap; /* clave responsive */
    gap: 10px;
}

/* =========================
   LOGO
========================= */
.tr_logo {
    display: flex;
    align-items: center;
}

    .tr_logo img {
        height: 40px;
    }

/* =========================
   ACCIONES
========================= */
.tr_actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   BOTONES
========================= */
.tr_btns {
    display: flex;
    gap: 8px;
}

/* BOTÓN BASE */
.tr_btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: 0.25s;
    font-size: 14px;
    white-space: nowrap;
}

/* LOGIN */
/* ===== CONTENEDOR LOGIN ===== */
.tr_login_box {
    width: 100%;
    max-width: 360px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== CAMPOS ===== */
.tr_login_fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* INPUT */
.tr_input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 14px;
    width: 100%;
}

/* ===== BOTONES ===== */
.tr_login_actions {
    display: flex;
    gap: 10px;
}

/* BOTON GENERAL */
.tr_btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* LOGIN */
.tr_login_submit {
    background: #1d4ed8;
    color: #fff;
}

/* CANCELAR */
.tr_login_btn {
    background: #e5e7eb;
    color: #111;
}

/* ===== VALIDADOR ===== */
.tr_login_validator {
    display: flex;
    justify-content: center;
    transform: scale(0.85);
}

/* REGISTRO / ADMIN */
.tr_registro_btn {
    background: #22c55e;
    color: #fff;
}

    .tr_registro_btn:hover {
        background: #16a34a;
    }


/* INPUTS */
.tr_input {
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #020617;
    color: white;
    outline: none;
    min-width: 120px;
}

    .tr_input::placeholder {
        color: #94a3b8;
    }

/* BOTÓN INGRESAR */
.tr_login_submit {
    background: #38bdf8;
    color: #020617;
}

    .tr_login_submit:hover {
        background: #0ea5e9;
    }

/* =========================
   TURNSTILE (captcha)
========================= */
.cf-turnstile {
    margin-top: 4px;
}

/* =========================
   MOBILE FIRST (<=768px)
========================= */
@media (max-width: 768px) {

    .tr_header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .tr_logo {
        justify-content: center;
    }

    .tr_actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .tr_btns {
        width: 100%;
        flex-direction: column;
    }

    .tr_login_box {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .tr_input {
        width: 100%;
    }

    .tr_btn {
        width: 100%;
        text-align: center;
    }

    /* captcha más compacto */
    .cf-turnstile {
        transform: scale(0.9);
        transform-origin: center;
    }
}

/* =========================
   TABLET (<=1024px)
========================= */
@media (max-width: 1024px) {

    .tr_input {
        min-width: 100px;
    }

    .tr_btn {
        padding: 7px 10px;
        font-size: 13px;
    }
}

/* =========================
   DESKTOP (>1024px)
========================= */
@media (min-width: 1025px) {

    .tr_header {
        flex-wrap: nowrap;
    }

    .tr_login_box {
        flex-wrap: nowrap;
    }
}
/*===========================*/
/*randers*/

/* CONTENEDOR */
.tr_table_container {
    width: 100%;
    overflow-x: auto;
}

/* TABLA */
.tr_table {
    width: 100%;
    border-collapse: collapse;
    background: #1e1e1e;
    color: white;
    border-radius: 10px;
    overflow: hidden;
}

    /* HEADER */
    .tr_table thead {
        background: #0f172a;
    }

    .tr_table th {
        padding: 12px;
        text-align: left;
        font-weight: bold;
        font-size: 14px;
        border-bottom: 1px solid #334155;
    }

    /* FILAS */
    .tr_table td {
        padding: 12px;
        border-bottom: 1px solid #334155;
        font-size: 14px;
    }

    /* HOVER */
    .tr_table tbody tr:hover {
        background: #273449;
        transition: 0.2s;
    }

/* FILA ACTIVA */
.tr_row_active {
    background: #2563eb !important;
}

/* ESTADOS */
.tr_success {
    color: #22c55e;
    font-weight: bold;
}

.tr_warning {
    color: #f59e0b;
    font-weight: bold;
}

.tr_danger {
    color: #ef4444;
    font-weight: bold;
}

/* ACCIONES */
.tr_actions {
    display: flex;
    gap: 8px;
}

.tr_btn {
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.tr_btn_edit {
    background: #3b82f6;
    color: white;
}

.tr_btn_delete {
    background: #ef4444;
    color: white;
}

/* RESPONSIVE */
@media (max-width: 768px) {

    .tr_table thead {
        display: none;
    }

    .tr_table,
    .tr_table tbody,
    .tr_table tr,
    .tr_table td {
        display: block;
        width: 100%;
    }

        .tr_table tr {
            margin-bottom: 15px;
            background: #1e1e1e;
            border-radius: 10px;
            padding: 10px;
        }

        .tr_table td {
            text-align: right;
            padding-left: 50%;
            position: relative;
        }

            .tr_table td::before {
                content: attr(data-label);
                position: absolute;
                left: 10px;
                text-align: left;
                font-weight: bold;
                color: #94a3b8;
            }
}
/* LAYOUT */
.tr_layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* SIDEBAR */
.tr_sidebar {
    background: #0f172a;
    padding: 20px;
}

/* MENU */
.tr_menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tr_menu_item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    transition: 0.2s;
}

    .tr_menu_item:hover {
        background: #1e293b;
        color: white;
    }

    .tr_menu_item.active {
        background: #2563eb;
        color: white;
    }

/* ICONO */
.tr_icon {
    font-size: 18px;
}

/* MAIN */
.tr_main {
    padding: 30px;
}

/* TITULO */
.tr_titulo {
    text-align: center;
    margin-bottom: 20px;
}

/* CONTENEDOR SIMPLE */
.tr_container {
    padding: 30px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .tr_layout {
        grid-template-columns: 1fr;
    }

    .tr_sidebar {
        display: none;
    }
}


.ch_torneos {
    padding: 20px;
    font-family: 'Segoe UI', sans-serif;
    color: white;
}

.ch_header {
    text-align: center;
    margin-bottom: 30px;
}

    .ch_header h1 {
        font-size: 32px;
        font-weight: bold;
        color: #00ff9c;
    }

.ch_sub {
    font-size: 14px;
    color: #ccc;
}

.ch_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

/* CARD */
.ch_card {
    border-radius: 15px;
    padding: 20px;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    transition: 0.3s;
}

    .ch_card:hover {
        transform: scale(1.03);
    }

    /* COLORES */

/* HEADER */
.ch_card_header h2 {
    margin-bottom: 10px;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,1), 0 4px 10px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,1);
}
/* BODY */
.ch_card_body p {
    margin: 5px 0;
    font-size: 14px;
    color: #38bdf8 ;
    text-shadow: 0 2px 4px rgba(0,0,0,1), 0 4px 10px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,1);
    font-size: 14px;
}
/*.ch_card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient( to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.75) );
    z-index: 1;
}*/
.ch_card > * {
    position: relative;
    z-index: 2;
}
/* PROGRESS */
.ch_progress {
    height: 8px;
    background: #333;
    border-radius: 10px;
    margin: 15px 0;
}

    .ch_progress .bar {
        height: 100%;
        background: linear-gradient(90deg, #00ff9c, #00c3ff);
        border-radius: 10px;
    }

/* FOOTER */
.ch_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* BUTTON */
.ch_btn {
    background: linear-gradient(90deg, #00c3ff, #00ff9c);
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    color: black;
}

    .ch_btn:hover {
        opacity: 0.8;
    }

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .ch_grid {
        grid-template-columns: 1fr;
    }
    .ch_header h1 {
        font-size: 24px;
    }
}
/* =========================
   CONTENEDOR GENERAL
========================= */
.ch_torneos_home {
    min-height: 100vh;
    padding: 20px;
    display: grid;
/*grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));*/ 
    grid-template-rows: auto 1fr;
    gap: 20px;
    /* 🔥 IMAGEN DE FONDO */
    background-image: url('../img/fondo_torneo.png'); /* cambia ruta */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

    /* Oscurecer fondo para legibilidad */
    .ch_torneos_home::before {
        content: "";
        position: absolute;
        inset: 0;
        background: rgb(93, 125, 200, 0.85);
        z-index: 0;
    }

    /* Asegurar contenido encima */
    .ch_torneos_home > * {
        position: relative;
        z-index: 1;
    }

/* =========================
   COLUMNAS SUPERIORES
========================= */
.ch_col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* =========================
   CARDS (reutilizable)
========================= */
.ch_card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    backdrop-filter: blur(6px);
    transition: all 0.3s ease;
}

    .ch_card:hover {
        transform: translateY(-4px);
    }

    /* TITULOS */
    .ch_card h3 {
        margin: 0 0 10px;
        font-size: 16px;
        color: #38bdf8;
    }

/* LISTAS */
.ch_list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ch_item {
    position: relative;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    /* 🔥 FONDO */
    background: linear-gradient(135deg, rgba(30,41,59,0.9), rgba(15,23,42,0.9));
    /* 🔷 BORDE MARCADO */
    border: 1px solid rgba(56,189,248,0.4);
    /* 💡 EFECTO PROFUNDIDAD */
    box-shadow: 0 0 0 1px rgba(56,189,248,0.15) inset, 0 4px 12px rgba(0,0,0,0.5), 0 0 12px rgba(56,189,248,0.2);
    /* TEXTO */
    color: #e2e8f0;
    font-weight: 500;
    letter-spacing: 0.3px;
    /* ANIMACIÓN */
    transition: all 0.25s ease;
    cursor: pointer;
}
    .ch_item:hover {
        color: #000;
        transform: translateY(-3px) scale(1.02);
        border: 1px solid #38bdf8;
        box-shadow: 0 0 0 1px rgba(56,189,248,0.4) inset, 0 8px 20px rgba(0,0,0,0.7), 0 0 18px rgba(56,189,248,0.6);
    }

    .ch_item:hover {
        background: rgba(56,189,248,0.15);
    }
    .ch_item a {
        text-decoration: none; /* ❌ quita subrayado */
        color: inherit; /* ✅ usa el color del padre */
        display: block; /* 🔥 hace clickeable todo el item */
    }
/* =========================
   BLOQUE INFERIOR FULL
========================= */
.ch_full {
    grid-column: 1 / 4;
}

.ch_noticias {
    background: rgba(2, 6, 23, 0.9);
    padding: 20px;
    border-radius: 16px;
    min-height: 150px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 900px) {

    .ch_torneos_home {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .ch_full {
        grid-column: 1;
    }
}

/*=====================*/
/*DEFAULT TORNEOS*/
/*=====================*/

/* ===== BASE ===== */
body {
    margin: 0;
    font-family: 'Segoe UI';
    background: #0b1e3a;
}

/* ===== HEADER ===== */
.trd_header {
    text-align: center;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    padding-top: 20px;
}

.trd_subtitle {
    text-align: center;
    color: #22c55e;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ===== LAYOUT ===== */
.trd_container {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 100px);
    overflow: hidden;
}

/* ===== MENU ===== */
.trd_menu {
    width: 240px;
    background: linear-gradient(180deg,#0d2a52,#071a33);
    border-radius: 14px;
    padding: 15px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.trd_menu_item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.2s;
}

    .trd_menu_item:hover {
        background: #1d4ed8;
    }

/* ===== CONTENIDO ===== */
.trd_content {
    flex: 1;
    display: flex;
    gap: 20px;
    overflow-x: auto; /* 🔥 scroll horizontal */
    overflow-y: hidden;
}
    
/* ===== PANEL ===== */
.trd_panel {
    background: #fff;
    border-radius: 14px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 400px;
    background: rgba(255, 255, 255, 0.6); /* 🔥 transparencia */
    backdrop-filter: blur(6px); /* efecto vidrio */
    min-width: 0;
    width: 100%;
}

.trd_content > .trd_panel:nth-child(1):nth-last-child(2),
.trd_content > .trd_panel:nth-child(2):nth-last-child(1) {
    flex: 1;
}
.trd_panel_header {
    padding: 15px;
    font-weight: 700;
    border-bottom: 1px solid #eee;
}

.trd_panel_body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

/* ===== HAMBURGUESA ===== */
.trd_hamburger {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 8px;
    z-index: 1000;
}

/* ===== OVERLAY ===== */
.trd_overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 900;
}

    .trd_overlay.active {
        display: block;
    }

/* ===== MOBILE ===== */
@media(max-width:900px) {

    body {
        overflow: auto;
    }

    .trd_container {
        flex-direction: column;
        height: auto;
    }

    .trd_content {
        flex-direction: column;
        overflow-x: hidden;
    }
    
    
    .trd_menu {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

        /*.trd_menu.active {
            left: 0;
        }*/
        .trd_menu.active {
            transform: translateX(0);
        }
    .trd_hamburger {
        display: block;
    }
}
@media (max-width: 768px) {

    .tr_layout {
        grid-template-columns: 1fr !important;
    }

    .tr_sidebar {
        display: none !important;
    }

    .tr_main {
        width: 100%;
    }
}
/* =========================
   GENERAL
========================= */
.trp_container {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

.trp_menu {
    width: 260px;
    background: #0f172a;
    color: #fff;
    transition: transform 0.3s ease;
}

.trp_content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
}

.trp_panel {
    flex: 1 1 calc(50% - 12px);
    min-width: 300px;
    background: rgba(255, 255, 255, 0.6); /* 🔥 transparencia */
    backdrop-filter: blur(6px); /* efecto vidrio */
    border-radius: 20px;
}

.trp_hamburger {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 10px 14px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 6px;
}

/* =========================
   DESKTOP
========================= */
@media (min-width: 1024px) {

    .trp_menu {
        transform: translateX(0);
        position: relative;
    }

    .trp_hamburger {
        display: none;
    }

    .trp_content {
        flex-direction: row;
    }

    .trp_panel {
        flex: 1 1 calc(50% - 12px);
    }
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {

    .trp_panel {
        flex: 1 1 100%;
    }
}

/* =========================
   MOVIL
========================= */
@media (max-width: 768px) {

    .trp_container {
        flex-direction: column;
    }

    .trp_menu {
        position: fixed;
        top: 140px; /* 👈 AQUÍ está la clave */
        left: 0;
        height: calc(100% - 60px); /* opcional pero recomendado */
        z-index: 1000;
        transform: translateX(-100%);
        width: 240px;
    }

        .trp_menu.active {
            transform: translateX(0);
        }

    .trp_content {
        width: 100%;
        padding-top: 60px;
    }

    .trp_panel {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .trp_hamburger {
        display: block;
    }
}
/* =========================
   HEADER
========================= */
.trp_header_wrap {
    width: 100%;
    padding: 16px 20px;
    background: #020617;
    border-bottom: 1px solid #1e293b;
    z-index: 10;
}

.trp_header {
    font-size: 22px;
    font-weight: 600;
    color: #e2e8f0;
}

.trp_subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 4px;
}