@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&display=swap');

:root {
    --primary-color: #7b2ff7;
    --secondary-color: #4b0082;
    --background-color: #121212;
    --text-color: #f4f2f8;
    --highlight-color: #ff6b6b;
    --card-bg: #1a1622;
    --font-display: 'Cinzel', 'Segoe UI', serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Colores de rareza (de más común a más rara) */
    --r-simple: #9aa5b1;
    --r-simple-soft: rgba(154, 165, 177, 0.16);
    --r-unique: #5cd85a;
    --r-unique-soft: rgba(92, 216, 90, 0.16);
    --r-elite: #43b8ff;
    --r-elite-soft: rgba(67, 184, 255, 0.16);
    --r-legendary: #ffcd3c;
    --r-legendary-soft: rgba(255, 205, 60, 0.16);
    --r-fabled: #d783ff;
    --r-fabled-soft: rgba(215, 131, 255, 0.18);
    --r-ultimate: #ff4757;
    --r-ultimate-soft: rgba(255, 71, 87, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    background-image: radial-gradient(1100px 550px at 50% -8%, #2a1740 0%, rgba(18, 18, 18, 0) 60%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-color);
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2.5rem 1rem;
    text-align: center;
    box-shadow: 0 4px 24px rgba(75, 0, 130, 0.45);
    position: relative;
}

header h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.25);
}

header p {
    font-size: 1.15rem;
    opacity: 0.9;
}

nav {
    background-color: var(--card-bg);
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

nav a:hover,
nav a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 14px rgba(123, 47, 247, 0.45);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    background-color: var(--card-bg);
    background-image: linear-gradient(160deg, rgba(255, 255, 255, 0.02), transparent 40%);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

section h2 {
    font-family: var(--font-display);
    color: var(--text-color);
    font-size: 1.9rem;
    letter-spacing: 0.02em;
    margin-bottom: 1.2rem;
    padding-bottom: 0.7rem;
    position: relative;
}

section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--highlight-color));
}

section h3 {
    color: var(--highlight-color);
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.command {
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    cursor: pointer;
}

.warning {
    background-color: var(--highlight-color);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.enchantment-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.enchantment-table th,
.enchantment-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.enchantment-table th {
    background-color: var(--primary-color);
    color: white;
}

.enchantment-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.vote-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.vote-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vote-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.vote-links a::before {
    content: "🔗";
}

.boss-teaser {
    text-align: center;
    margin: 2rem 0;
}

.boss-teaser img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

footer {
    background-color: var(--card-bg);
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===================================================
   Lista de Encantamientos
   =================================================== */

.ench-intro {
    opacity: 0.85;
    margin-bottom: 1.3rem;
    max-width: 70ch;
}

.rarity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.3rem;
    margin: 0 0 1.6rem;
    font-size: 0.82rem;
}

.rarity-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    opacity: 0.85;
}

.rarity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.ench-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.9rem;
}

.search-wrap {
    position: relative;
    flex: 1 1 260px;
}

.search-wrap::before {
    content: "🔍";
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.45;
    font-size: 0.85rem;
    pointer-events: none;
}

#enchSearch {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.3rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #171320;
    color: var(--text-color);
    font-size: 1rem;
}

#enchSearch:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 47, 247, 0.3), 0 0 22px rgba(123, 47, 247, 0.18);
}

.rarity-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rarity-chip {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    padding: 0.42rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rarity-chip:hover {
    transform: translateY(-1px);
    border-color: var(--chip-color, var(--primary-color));
}

.rarity-chip.active {
    background: var(--chip-color, var(--primary-color));
    border-color: transparent;
    color: #0e0e12;
    box-shadow: 0 6px 18px var(--chip-glow, rgba(123, 47, 247, 0.45));
}

.ench-count {
    opacity: 0.6;
    font-size: 0.88rem;
    margin: 0.6rem 0 1.3rem;
}

.ench-list {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ench-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.1rem 1.4rem;
    border-left: 4px solid var(--card-accent, var(--primary-color));
    background: linear-gradient(90deg, var(--card-soft, rgba(255, 255, 255, 0.03)) 0%, transparent 55%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.ench-item:last-child {
    border-bottom: none;
}

.ench-item:hover {
    padding-left: 1.65rem;
    background: linear-gradient(90deg, var(--card-soft, rgba(255, 255, 255, 0.07)) 0%, rgba(255, 255, 255, 0.02) 60%, transparent);
}

.ench-item[data-rarity="Ultimate"] {
    box-shadow: inset 0 0 26px rgba(255, 71, 87, 0.07);
}

.ench-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ench-name-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.ench-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.12rem;
    letter-spacing: 0.01em;
    color: #fdfbff;
}

.ench-rarity-pill {
    background: var(--card-soft, rgba(255, 255, 255, 0.08));
    color: var(--card-accent, var(--primary-color));
    padding: 0.2rem 0.6rem;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ench-level {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    opacity: 0.9;
    white-space: nowrap;
}

.ench-desc {
    font-size: 0.92rem;
    line-height: 1.55;
    opacity: 0.88;
    max-width: 80ch;
}

.ench-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ench-tag {
    font-size: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 0.18rem 0.55rem;
    border-radius: 4px;
    opacity: 0.8;
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    opacity: 0.65;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.1rem;
    }

    nav {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        position: static;
    }

    .container {
        padding: 0 0.5rem;
    }

    .ench-item-head {
        gap: 0.5rem;
    }
}