/* ==========================================
   🏛️ EL PANTEÓN - DISEÑO INTEGRAL (COMPLETO)
   ========================================== */

.pvp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(20, 15, 10, 0.95) 0%, rgba(0, 0, 0, 0.98) 100%);
    backdrop-filter: blur(10px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #e0d5c0;
}

.pvp-window {
    width: 950px;
    height: 700px;
    background: #0d0a08 url('https://www.transparenttextures.com/patterns/dark-leather.png');
    border: 2px solid #5a4632;
    box-shadow: 0 0 100px rgba(0, 0, 0, 1), inset 0 0 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 2px;
    animation: pvpFadeIn 0.4s ease-out;
}

/* Esquinas Ornamentadas */
.corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid #ccaa4b;
    z-index: 10;
    pointer-events: none;
}

.corner.tl {
    top: -5px;
    left: -5px;
    border-right: none;
    border-bottom: none;
}

.corner.tr {
    top: -5px;
    right: -5px;
    border-left: none;
    border-bottom: none;
}

.corner.bl {
    bottom: -5px;
    left: -5px;
    border-right: none;
    border-top: none;
}

.corner.br {
    bottom: -5px;
    right: -5px;
    border-left: none;
    border-top: none;
}

/* Cabecera */
.pvp-header {
    padding: 20px 30px;
    background: linear-gradient(to bottom, #1a120b, #0d0a08);
    border-bottom: 2px solid #ccaa4b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pvp-title {
    color: #ccaa4b;
    font-size: 2.2rem;
    letter-spacing: 5px;
    text-shadow: 0 0 10px rgba(204, 170, 75, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
}

.pvp-btn-close {
    background: none;
    border: none;
    color: #5a4632;
    font-size: 2.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.pvp-btn-close:hover {
    color: #ff4d4d;
    transform: rotate(90deg);
}

.pvp-content {
    flex: 1;
    padding: 25px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* --- SECCIÓN DE ESTADO (CONECTANDO) --- */
.pvp-status-screen {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.status-orb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #1a120b;
    border: 3px solid #ccaa4b;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inner-orb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ccaa4b;
    filter: blur(4px);
    animation: pvpPulse 2s infinite;
}

.status-orb.error .inner-orb {
    background: #ff4d4d;
    animation: none;
    filter: none;
    width: 40px;
    height: 40px;
}

.status-orb.success .inner-orb {
    background: #2ecc71;
}

/* --- LOBBY Y LISTA DE SALAS --- */
.pvp-lobby {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lobby-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lobby-info h3 {
    margin: 0;
    color: #ccaa4b;
    font-size: 1.5rem;
}

.lobby-info small {
    color: #888;
}

.pvp-room-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.pvp-room-card {
    background: linear-gradient(90deg, #15100a 0%, #1a140d 100%);
    border: 1px solid #332518;
    border-left: 5px solid #5a4632;
    padding: 15px 25px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.pvp-room-card:hover {
    transform: translateX(8px);
    border-left-color: #ccaa4b;
}

.room-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.room-status-dot.lobby {
    background: #2ecc71;
    box-shadow: 0 0 8px #2ecc71;
}

.room-status-dot.combat {
    background: #ffce54;
    box-shadow: 0 0 8px #ffce54;
}

.room-name {
    font-size: 1.2rem;
    color: #eee;
}

.room-tags {
    margin-top: 5px;
}

.room-tag {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #4b3621;
    color: #aaa;
    margin-right: 5px;
}

.empty-state {
    text-align: center;
    padding-top: 50px;
    opacity: 0.5;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

/* --- VISTA DE SALA (ROOM) --- */
.pvp-room-view {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.room-top-bar {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
}

.room-title-info h3 {
    margin: 0;
    color: #ccaa4b;
}

.room-id-tag {
    font-size: 0.7rem;
    color: #666;
    font-family: monospace;
}

.pvp-teams {
    display: flex;
    gap: 20px;
    flex: 1;
    position: relative;
}

.team-panel {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #2a1f14;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.team-header {
    text-align: center;
    font-weight: bold;
    padding: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #5a4632;
}

.team-a .team-header {
    color: #ffce54;
    border-color: #ffce54;
}

.team-b .team-header {
    color: #5d9cec;
    border-color: #5d9cec;
}

.pvp-vs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.vs-seal {
    width: 50px;
    height: 50px;
    background: #1a120b;
    border: 2px solid #ccaa4b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #ccaa4b;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.player-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #2a1f14;
    padding: 10px 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-item.is-ready {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
}

.player-item.is-me {
    border-color: #ccaa4b;
}

.p-ready-indicator {
    margin-left: auto;
    font-size: 0.7rem;
    color: #5a4632;
}

.is-ready .p-ready-indicator {
    color: #2ecc71;
}

/* Chat y Bottom Bar */
.room-bottom {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    height: 160px;
}

.chat-container {
    flex: 2;
    background: #050505;
    border: 1px solid #332518;
    display: flex;
    flex-direction: column;
}

.chat-display {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.chat-msg {
    margin-bottom: 4px;
    line-height: 1.2;
}

.chat-msg strong {
    color: #ccaa4b;
    margin-right: 5px;
}

.chat-input-wrapper {
    border-top: 1px solid #332518;
}

#chatInput {
    background: #111;
    border: none;
    color: #ddd;
    padding: 10px;
    width: 100%;
    outline: none;
}

.ready-wrapper {
    flex: 1;
}

/* --- BOTONES --- */
.pvp-btn-main {
    background: #ccaa4b;
    color: #1a120b;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.pvp-btn-main:hover {
    background: #eee;
    transform: translateY(-2px);
}

.glow-gold {
    box-shadow: 0 0 15px rgba(204, 170, 75, 0.3);
}

.pvp-btn-join {
    background: #5a4632;
    color: #ccaa4b;
    border: 1px solid #ccaa4b;
    padding: 6px 15px;
    cursor: pointer;
    font-family: inherit;
}

.pvp-btn-join:hover {
    background: #ccaa4b;
    color: #1a120b;
}

.pvp-btn-back {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    color: #888;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 0.8rem;
}

.pvp-btn-back:hover {
    background: #ff4d4d;
    color: white;
    border-color: #ff4d4d;
}

.pvp-btn-team {
    background: none;
    border: 1px solid #332518;
    color: #666;
    padding: 8px;
    margin-top: auto;
    cursor: pointer;
    font-size: 0.8rem;
}

.pvp-btn-team:hover {
    border-color: #ccaa4b;
    color: #ccaa4b;
}

.pvp-btn-ready {
    width: 100%;
    height: 100%;
    background: #1a120b;
    color: #4b3621;
    border: 3px solid #332518;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
}

.pvp-btn-ready.ready-active {
    background: #4bcc4d;
    color: #ebebeb;
    font-size: 1.9rem;
    stroke: #000;
    text-shadow: 0 0 5px #000;
    border-color: #fff;
    box-shadow: 0 0 30px rgba(75, 204, 107, 0.4);
    font-weight: bold;
}

/* --- SUBMODALES --- */
.pvp-submodal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.pvp-submodal-box {
    background: #1a120b;
    border: 2px solid #ccaa4b;
    padding: 35px;
    width: 450px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 1);
}

.pvp-input-main {
    width: 100%;
    background: #050505;
    border: 1px solid #4b3621;
    color: #ccaa4b;
    padding: 12px;
    margin: 15px 0;
    font-family: inherit;
    font-size: 1.1rem;
}

.select-medieval {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ccaa4b%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.6rem auto;
}

.pvp-submodal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.pvp-btn-confirm {
    flex: 1;
    background: #ccaa4b;
    color: #1a120b;
    border: none;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
}

.pvp-btn-cancel {
    flex: 1;
    background: #333;
    color: #888;
    border: none;
    padding: 12px;
    cursor: pointer;
}

/* Scrollbar */
.themed-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.themed-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.themed-scrollbar::-webkit-scrollbar-thumb {
    background: #4b3621;
    border-radius: 3px;
}

/* Animaciones */
@keyframes pvpPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes pvpFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}