﻿.character-page {
    height: 100vh;
    overflow: hidden;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.character-main {
    flex: 1;
    min-height: 0;
    padding: 0.55rem 0 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.character-hero {
    padding: 0.6rem 0.7rem;
    position: relative;
    overflow: hidden;
}

.character-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(130, 212, 255, 0.06),
        rgba(130, 212, 255, 0.06) 1px,
        transparent 1px,
        transparent 7px
    );
    pointer-events: none;
}

.hero-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.46rem;
}

.character-hero h1 {
    font-size: clamp(1rem, 1.75vw, 1.3rem);
    letter-spacing: 0.04em;
}

.hero-rank {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-soft);
    border: 1px solid #2d5f7d;
    border-radius: 999px;
    padding: 0.22rem 0.48rem;
    background: rgba(12, 30, 43, 0.8);
}

.hud-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
}

.hud-card {
    border: 1px solid #325f7a;
    border-radius: 9px;
    padding: 0.34rem 0.42rem;
    background: linear-gradient(180deg, rgba(14, 36, 52, 0.95), rgba(9, 24, 36, 0.95));
}

.hud-label {
    font-size: 0.62rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--text-soft);
    margin-bottom: 0.08rem;
}

.hud-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dff6ff;
}

.character-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(210px, 0.95fr) minmax(270px, 1.05fr) minmax(240px, 1fr);
    gap: 0.58rem;
}

.stats-panel,
.equipment-panel,
.inventory-panel {
    padding: 0.58rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.stats-panel::after,
.equipment-panel::after,
.inventory-panel::after {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(133, 196, 230, 0.14);
    border-radius: 9px;
    pointer-events: none;
}

.stats-panel h2,
.equipment-panel h2,
.inventory-panel h2 {
    font-size: 0.93rem;
    margin-bottom: 0.16rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stats-subtitle,
.inventory-help {
    color: var(--text-soft);
    font-size: 0.68rem;
    margin-bottom: 0.42rem;
    letter-spacing: 0.05em;
}

.stats-list {
    list-style: none;
    display: grid;
    gap: 0.35rem;
    overflow: auto;
    min-height: 0;
    padding-right: 0.1rem;
}

.stat-item {
    border: 1px solid #35617d;
    border-radius: 8px;
    padding: 0.38rem 0.45rem;
    background: linear-gradient(180deg, rgba(16, 39, 56, 0.95), rgba(10, 27, 39, 0.95));
}

.stat-item strong {
    display: block;
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 0.08rem;
    color: #c9edff;
}

.stat-item .stat-formula {
    color: #9dc2d7;
    font-size: 0.65rem;
}

.stat-item .stat-total {
    margin-top: 0.03rem;
    font-size: 0.83rem;
    font-weight: 700;
    color: #6ff7dd;
}

.equipment-grid {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    grid-template-areas:
        ". mascara embarcacion"
        "arma neopreno tubo"
        ". aletas .";
    gap: 0.4rem;
    overflow: auto;
    padding-right: 0.1rem;
}

.equip-slot {
    border: 1px solid #3b6c88;
    border-radius: 10px;
    background:
        linear-gradient(145deg, rgba(8, 24, 36, 0.96), rgba(12, 31, 45, 0.96));
    min-height: 74px;
    padding: 0.28rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.18rem;
    box-shadow: inset 0 0 0 1px rgba(130, 198, 231, 0.13);
}

.equip-slot.highlight {
    border-color: var(--accent);
    box-shadow:
        inset 0 0 0 1px rgba(130, 198, 231, 0.13),
        0 0 0 2px rgba(92, 242, 215, 0.17);
}

.slot-label {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.56rem;
    color: #9cc8de;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.slot-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.08rem;
    height: 1.08rem;
    border: 1px solid #345f7a;
    border-radius: 5px;
    background: rgba(20, 53, 74, 0.8);
    overflow: hidden;
    padding: 1px;
}

.slot-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.slot-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-slot {
    color: #6c899b;
    font-size: 0.63rem;
    text-transform: uppercase;
}

.inventory-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.22rem;
    margin-bottom: 0.45rem;
}

.inventory-tab {
    border: 1px solid #3a6b87;
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(11, 30, 43, 0.95), rgba(8, 22, 33, 0.95));
    color: var(--text-soft);
    padding: 0.2rem 0.42rem;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.tab-icon {
    width: 0.82rem;
    height: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #365f79;
    border-radius: 4px;
    padding: 1px;
    background: rgba(24, 58, 80, 0.85);
}

.tab-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

.inventory-tab.active {
    color: #042130;
    border-color: transparent;
    background: linear-gradient(90deg, var(--accent), #9afdf0);
}

.inventory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    overflow: auto;
    min-height: 0;
    padding-right: 0.12rem;
}

.inventory-grid.highlight {
    outline: 1px dashed var(--accent);
    outline-offset: 2px;
    border-radius: 8px;
}

.item-card {
    border: 1px solid #3a6784;
    border-radius: 8px;
    padding: 0.3rem 0.4rem;
    background: linear-gradient(145deg, rgba(17, 42, 60, 0.94), rgba(10, 27, 39, 0.94));
    cursor: grab;
    user-select: none;
}

.item-card:active {
    cursor: grabbing;
}

.item-card.dragging {
    opacity: 0.5;
}

.item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    margin-bottom: 0.08rem;
}

.item-name {
    font-weight: 700;
    font-size: 0.68rem;
    line-height: 1.2;
}

.item-tier {
    border: 1px solid #426f8b;
    border-radius: 4px;
    padding: 0.05rem 0.22rem;
    font-size: 0.53rem;
    text-transform: uppercase;
    color: #d8f4ff;
    letter-spacing: 0.06em;
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.58rem;
    color: var(--text-soft);
    margin-bottom: 0.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.item-meta-icon {
    width: 0.68rem;
    height: 0.68rem;
    display: inline-block;
}

.item-bonus {
    font-size: 0.58rem;
    color: #b7efff;
    line-height: 1.28;
}

.quality-comun {
    border-color: #3d6782;
}

.quality-raro {
    border-color: #2f7fe9;
    box-shadow: 0 0 0 1px rgba(47, 127, 233, 0.22);
}

.quality-epico {
    border-color: #c89bff;
    box-shadow: 0 0 0 1px rgba(200, 155, 255, 0.22);
}

.equip-slot .item-card {
    width: 100%;
    padding: 0.2rem 0.28rem;
}

.equip-slot .item-head {
    margin-bottom: 0;
}

.equip-slot .item-name {
    font-size: 0.6rem;
}

.equip-mini-stats {
    margin-top: 0.08rem;
    font-size: 0.5rem;
    line-height: 1.2;
    color: #93e8ff;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}

.equip-slot .item-tier,
.equip-slot .item-meta,
.equip-slot .item-bonus {
    display: none;
}

.equip-slot[data-slot="arma"] {
    grid-area: arma;
}

.equip-slot[data-slot="mascara"] {
    grid-area: mascara;
}

.equip-slot[data-slot="neopreno"] {
    grid-area: neopreno;
}

.equip-slot[data-slot="aletas"] {
    grid-area: aletas;
}

.equip-slot[data-slot="tubo"] {
    grid-area: tubo;
}

.equip-slot[data-slot="embarcacion"] {
    grid-area: embarcacion;
}

@media (max-width: 1020px) {
    .character-page {
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: visible;
    }

    .character-main {
        min-height: auto;
        padding: 0.85rem 0 1rem;
        gap: 0.75rem;
    }

    .character-layout {
        min-height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 0.75rem;
    }

    .stats-panel,
    .equipment-panel,
    .inventory-panel {
        overflow: visible;
    }

    .stats-list,
    .equipment-grid,
    .inventory-grid {
        overflow: visible;
        min-height: auto;
        padding-right: 0;
    }

    .inventory-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .character-hero h1 {
        font-size: 1.25rem;
    }

    .hero-rank {
        font-size: 0.72rem;
    }

    .hud-label {
        font-size: 0.68rem;
    }

    .hud-value {
        font-size: 1rem;
    }

    .item-name {
        font-size: 0.78rem;
    }

    .item-bonus {
        font-size: 0.66rem;
    }

    .inventory-tab {
        font-size: 0.64rem;
    }
}

@media (max-width: 520px) {
    .hero-rank {
        display: none;
    }

    .hud-value {
        font-size: 0.78rem;
    }

    .equipment-grid {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
        grid-template-areas:
            "arma mascara"
            "neopreno neopreno"
            "aletas tubo"
            "embarcacion embarcacion";
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .hud-row {
        grid-template-columns: 1fr;
    }
}
