/* styles.css */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #0b1a27;
    background-image: url('/assets/images/frosenland.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #222;
    padding: 35px 25px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.7);
    width: 95%;
    max-width: 420px;
    margin: 20px;
}

:root {
    --logo-max-width: 182px;
}

.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.logo-link {
    display: block;
    width: 100%;
    text-align: center;
    line-height: 0;
    text-decoration: none;
    margin-bottom: 10px;
}

.site-logo {
    max-width: var(--logo-max-width);
    width: auto;
    height: auto;
    margin: 0 auto;
    display: block;
}

h1 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    text-align: center;
    margin-bottom: 10px;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    margin-bottom: 20px;
}

p {
    text-align: center;
    font-size: 1rem;
    color: #ccc;
    margin: 5px 0 15px 0;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-size: 1.05rem;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    margin-bottom: 12px;
    background-color: #333;
    color: #fff;
    font-size: 1.05rem;
}

input[type="submit"] {
    background-color: #0f9d58;
    color: white;
    padding: 14px;
    border: none;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #0c7f46;
}

.message {
    margin-top: 18px;
    text-align: center;
    font-size: 1rem;
}

@media (max-width: 768px) {
    html {
        font-size: 17px; /* Tamaño base ligeramente aumentado para legibilidad */
    }

    body {
        padding: 20px 10px;
        flex-direction: column;
        align-items: stretch;
    }

    .container {
        width: 100%;
        max-width: none;
        margin: 0 auto;
        padding: 32px 20px;
        border-radius: 0; /* Estilo más plano para ocupar toda la pantalla */
    }

    h1 {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 18px;
    }

    p {
        font-size: 1.1rem;
        margin-bottom: 18px;
    }

    label {
        font-size: 1.2rem;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"] {
        font-size: 1.2rem;
        padding: 16px;
        margin-bottom: 16px;
    }

    input[type="submit"] {
        font-size: 1.25rem;
        padding: 18px;
    }

    .message {
        font-size: 1.1rem;
        margin-top: 22px;
    }
}

.players-list {
    margin-top: 35px;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.players-list table {
    width: 100%;
    border-collapse: collapse;
    color: #fff;
    font-size: 1rem;
}

.players-list th, .players-list td {
    border: 1px solid #444;
    padding: 10px;
    text-align: center;
}

.players-list th {
    background-color: #333;
    font-weight: bold;
}

/* Center "Your Characters" block on panel.php only */
.players-list.panel-characters {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: auto;
}

.players-list.panel-characters table {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
}

/* Collapsible change-password on /panel */
details.panel-password {
    margin: 20px auto 30px;
    max-width: 420px;
    padding: 12px 18px 18px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 10px;
    color: #fff;
}

details.panel-password > summary.panel-password-summary {
    cursor: pointer;
    list-style: none;
    text-align: center;
    font-size: 1.15rem;
    font-weight: bold;
    color: #ffcc00;
    padding: 6px 0;
    user-select: none;
}

details.panel-password > summary.panel-password-summary::-webkit-details-marker {
    display: none;
}

details.panel-password > summary.panel-password-summary::before {
    content: "▸ ";
    color: #ffcc00;
}

details.panel-password[open] > summary.panel-password-summary::before {
    content: "▾ ";
}

details.panel-password > summary.panel-password-summary:hover {
    color: #ffe066;
}

@media (max-width: 768px) {
    .players-list {
        font-size: 1.1rem;
        padding: 16px;
    }

    .players-list table,
    .players-list th,
    .players-list td {
        font-size: 1rem;
        padding: 8px;
    }
}

/* Botón de crear cuenta más discreto y estilizado */
button {
    background-color: #222; /* Fondo oscuro como el resto de la tarjeta */
    color: #ccc; /* Texto en gris claro */
    border: 1px solid #444; /* Borde tenue */
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

button:hover {
    background-color: #333;
    color: #fff;
}

.progress-bar {
    width: 100%;
    background-color: #ddd;
    height: 8px;
    border-radius: 4px;
    margin-top: 4px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
}

/* ========== Site navbar ========== */
nav.site-nav {
    width: 100%;
    margin: 10px 0 20px;
    background-color: #1a1a1a;
    color: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    font-family: 'Segoe UI', sans-serif;
}

nav.site-nav .nav-toggle {
    display: block;
    width: 100%;
    background-color: #222;
    color: #ffcc00;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 12px 14px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav.site-nav .nav-toggle:hover {
    background-color: #333;
    color: #fff;
}

nav.site-nav .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 10px;
    padding-top: 4px;
}

nav.site-nav .nav-menu.is-open {
    display: flex;
}

nav.site-nav ul,
nav.site-nav ul.nav-links,
nav.site-nav ul.nav-auth {
    list-style: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

nav.site-nav li {
    list-style: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

nav.site-nav a,
nav.site-nav a:link,
nav.site-nav a:visited {
    display: block;
    color: #ccc;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 10px 8px;
    border-radius: 6px;
    border-bottom: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav.site-nav a:hover,
nav.site-nav a:focus {
    color: #fff;
    background-color: #333;
    text-decoration: none;
}

nav.site-nav a.active,
nav.site-nav a.active:link,
nav.site-nav a.active:visited {
    color: #ffcc00;
    font-weight: bold;
    background-color: #2a2a2a;
    box-shadow: inset 3px 0 0 #ffcc00;
}

nav.site-nav .nav-user {
    display: block;
    color: #ffcc00;
    font-size: 0.95rem;
    font-weight: bold;
    padding: 10px 8px;
}

nav.site-nav .nav-lang {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 10px;
}

nav.site-nav .nav-lang a {
    display: inline-block;
    padding: 6px 8px;
}

/* ========== Ranking ========== */
.container.ranking-page {
    max-width: 720px;
}

.container.armory-page {
    max-width: 1100px;
}

.container.wide-page {
    max-width: 960px;
}

.ranking-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    padding: 10px;
    background-color: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.ranking-tabs a.ranking-tab,
.ranking-tabs a.ranking-tab:link,
.ranking-tabs a.ranking-tab:visited {
    display: inline-block;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #222;
    border: 1px solid #444;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.ranking-tabs a.ranking-tab:hover {
    color: #fff;
    background-color: #333;
}

.ranking-tabs a.ranking-tab.active {
    color: #ffcc00;
    background-color: #2a2a2a;
    border-color: #ffcc00;
}

.ranking-filters {
    margin: 0 0 18px;
    padding: 12px;
    background-color: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.ranking-filters label {
    display: inline-block;
    margin: 8px 8px 8px 0;
    font-size: 0.95rem;
    color: #ccc;
}

.ranking-filters select {
    width: auto;
    min-width: 140px;
    margin: 0 12px 8px 0;
    padding: 8px 10px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #333;
    color: #fff;
    font-size: 0.95rem;
}

.ranking-list {
    overflow-x: auto;
}

.ranking-list table {
    margin: 0 auto;
}

/* ========== Armory item tooltips ========== */
.item-hover {
    position: relative;
    display: inline-block;
    cursor: help;
    outline: none;
}

.item-hover .item-name {
    font-weight: bold;
    text-decoration: none;
}

.item-hover .item-tooltip {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 50;
    min-width: 220px;
    max-width: 280px;
    padding: 10px 12px;
    background-color: rgba(0, 0, 0, 0.92);
    border: 1px solid #444;
    border-radius: 6px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
    text-align: left;
    white-space: normal;
    pointer-events: none;
}

.item-hover:hover .item-tooltip,
.item-hover:focus .item-tooltip,
.item-hover:focus-within .item-tooltip {
    display: block;
}

.item-tooltip-name {
    display: block;
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 6px;
}

.item-tooltip-line,
.item-tooltip-stat {
    display: block;
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.35;
}

.item-tooltip-stat {
    color: #1eff00;
}

/* ========== Armory iframe embed (/armory-view) ========== */
.armory-embed {
    margin: 20px auto 40px;
    width: 100%;
    max-width: 100%;
}

.armory-embed-loading {
    text-align: center;
    color: #aaa;
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.armory-iframe {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    min-height: 70vh;
}


