:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --sc-blue: #2672ec;
    --sc-dark-blue: #1b5bbd;
    --sc-yellow: #ffcf0e;
    --sc-text: #1a1a1a;
    --sc-gray: #7a7a7a;
    --sc-purple: #9b59b6;
    --sc-green: #2ecc71;
    --nav-height: 160px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-height) + 20px); }
body { font-family: 'Roboto', sans-serif; background-color: var(--bg-color); margin: 0; padding: 0; padding-top: var(--nav-height); color: var(--sc-text); }

/* --- STICKY NAV --- */
.sticky-nav {
    position: fixed; top: 0; left: 0; width: 100%; min-height: 120px;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; z-index: 1000; padding: 10px 0;
}

/* Верхняя строка: Выбор кампании + Сортировка + Поиск */
.nav-top-row {
    display: flex; gap: 10px; width: 100%; max-width: 1100px; padding: 0 15px;
    justify-content: center; align-items: center; flex-wrap: wrap;
}

.campaign-select {
    padding: 12px 20px; border-radius: 50px; border: 2px solid var(--sc-blue);
    background: white; font-family: 'Lilita One', cursive; font-size: 1.1rem;
    color: var(--sc-blue); outline: none; cursor: pointer; min-width: 200px;
}

.sort-select {
    padding: 12px 20px; border-radius: 50px; border: 2px solid var(--sc-yellow);
    background: white; font-family: 'Lilita One', cursive; font-size: 1.1rem;
    color: #d3a600; outline: none; cursor: pointer; min-width: 150px;
}

.search-input {
    flex-grow: 1; padding: 12px 20px; border-radius: 50px; border: 2px solid #eee;
    background: #f9f9f9; font-size: 1rem; outline: none; transition: all 0.2s;
}
.search-input:focus { border-color: var(--sc-blue); background: #fff; }

/* Нижняя строка: Кнопки бравлеров */
.nav-buttons-row {
    display: flex; gap: 8px; overflow-x: auto; width: 100%; justify-content: center;
    padding: 5px 15px; scrollbar-width: none;
}
.nav-buttons-row::-webkit-scrollbar { display: none; }

.nav-btn {
    background: #e0e0e0; color: #555; font-family: 'Lilita One', cursive;
    font-size: 0.95rem; border: none; padding: 8px 18px; border-radius: 50px;
    cursor: pointer; transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
}
.nav-btn:hover { transform: translateY(-2px); background: #d0d0d0; }
.nav-btn.active { background: linear-gradient(135deg, #2672ec, #0044aa); color: white; transform: scale(1.05); }
.nav-btn.overall-btn { background: linear-gradient(135deg, #ffcf0e, #f39c12); color: #1a1a1a; }
.nav-btn.overall-btn.active { background: linear-gradient(135deg, #ffcf0e, #e67e22); color: black; }
.nav-btn.help-btn { background: linear-gradient(135deg, #2ecc71, #27ae60); color: white; margin-left: 10px;}

@media (max-width: 800px) {
    :root { --nav-height: 200px; }
    .nav-buttons-row { justify-content: flex-start; }
    .nav-top-row { flex-direction: column; width: 100%; }
    .search-input, .campaign-select, .sort-select { width: 100%; }
}

header {
    background: linear-gradient(135deg, #0044aa, #2672ec); color: white;
    padding: 20px 20px; text-align: center; margin-bottom: 40px; border-radius: 0 0 30px 30px;
}
h1 { font-family: 'Lilita One', cursive; font-size: 2.5rem; margin: 0; text-shadow: 2px 2px 0px #000; }

.last-update { font-size: 0.9rem; color: rgba(255, 255, 255, 0.8); margin-top: 5px; }

h2.brawler-title {
    font-family: 'Lilita One', cursive; font-size: 3rem; color: var(--sc-blue);
    text-align: center; margin: 10px 0 30px 0; text-transform: uppercase;
    text-shadow: 2px 2px 0px #fff; display: inline-block; border-bottom: 4px solid var(--sc-yellow);
}

.brawler-section { text-align: center; margin-bottom: 80px; display: none; animation: fadeIn 0.3s; }
.brawler-section.visible { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px 20px; }
.skins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; text-align: left; }

/* --- STYLES FOR CARDS & HALL OF FAME --- */
.corner-icon {
    position: absolute; top: -18px; right: -18px; width: 65px; height: auto;
    z-index: 10; filter: drop-shadow(0 5px 8px rgba(0,0,0,0.25)); transition: transform 0.3s ease;
}
.card:hover .corner-icon { transform: scale(1.1) rotate(5deg); }

.card {
    background: var(--card-bg); border-radius: 20px; overflow: visible; /* Visible for icon */
    box-shadow: 0 10px 20px rgba(0,0,0,0.08); transition: transform 0.3s, box-shadow 0.3s;
    position: relative; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(38, 114, 236, 0.2); }

.winner-card {
    border: 4px solid transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(135deg, #ffcf0e, #f39c12, #ffb300, #ffcf0e);
    background-origin: border-box; background-clip: padding-box, border-box;
    box-shadow: 0 15px 40px rgba(255, 207, 14, 0.35); transform: scale(1.02);
}
.winner-card:hover { box-shadow: 0 20px 50px rgba(255, 207, 14, 0.5); transform: scale(1.05) translateY(-5px); }

.runnerup-card {
    border: 4px solid transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)), linear-gradient(135deg, #b0bec5, #cfd8dc, #eceff1, #b0bec5);
    background-origin: border-box; background-clip: padding-box, border-box;
    box-shadow: 0 10px 30px rgba(176, 190, 197, 0.3);
}
.runnerup-card:hover { box-shadow: 0 15px 35px rgba(176, 190, 197, 0.45); transform: translateY(-5px); }

.card-rank {
    position: absolute; top: 15px; left: 15px; background-color: var(--sc-yellow);
    color: #000; font-family: 'Lilita One', cursive; padding: 6px 10px; border-radius: 10px;
    font-size: 1rem; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 2;
    display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2;
}
.rank-row span { font-family: 'Roboto', sans-serif; font-size: 0.8rem; opacity: 0.8; font-weight: bold; }

.card-img-container { width: 100%; padding-top: 75%; position: relative; background-color: #eee; border-radius: 20px 20px 0 0; overflow: hidden; }
.card-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.card-content { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-family: 'Lilita One', cursive; font-size: 1.4rem; margin: 0 0 5px 0; color: #333; text-transform: uppercase; }
.card-author { color: var(--sc-gray); font-size: 0.95rem; margin-bottom: 15px; }
.card-author span { font-weight: bold; color: var(--sc-blue); }
.card-stats { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #eee; padding-top: 15px; }
.vote-count { font-weight: bold; color: var(--sc-blue); font-size: 1.1rem; }

.card-btn {
    background-color: var(--sc-blue); color: white; text-decoration: none;
    padding: 8px 16px; border-radius: 8px; font-weight: bold; font-size: 0.9rem; transition: background 0.2s;
}
.card-btn:hover { background-color: var(--sc-dark-blue); }
.card-btn.disabled { background-color: #ccc; cursor: not-allowed; pointer-events: none; }

.load-more-btn {
    background-color: var(--sc-blue); color: white; border: none; padding: 15px 40px;
    font-family: 'Lilita One', cursive; font-size: 1.2rem; border-radius: 50px; cursor: pointer; margin-top: 40px;
}
.load-more-container { margin-top: 40px; text-align: center; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal-overlay.open { display: flex; }
.modal-content { background: white; padding: 30px; border-radius: 20px; max-width: 600px; width: 90%; position: relative; }
.modal-close { position: absolute; top: 15px; right: 20px; font-size: 2rem; cursor: pointer; }
.modal-body ul { background: #f0f7ff; padding: 20px 20px 20px 40px; border-radius: 10px; margin-bottom: 20px; border-left: 5px solid var(--sc-blue); }
.modal-title { font-family: 'Lilita One', cursive; font-size: 1.8rem; color: var(--sc-blue); margin-bottom: 20px; }