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

body {
    font-family: 'Inter', sans-serif;
    background: #f5f9ff;
    color: #0a2b3e;
    line-height: 1.5;
}

.header {
    background: white;
    border-bottom: 3px solid #2c7cb6;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.logo-placeholder {
    width: auto;
    height: auto;
    background: none;
    border: none;
}
.logo h1 {
    font-size: 1.8rem;
    color: #1a5a8a;
}
.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.nav a {
    text-decoration: none;
    font-weight: 600;
    color: #1a5a8a;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0.5rem 0;
}
.nav a:hover {
    color: #2c7cb6;
}
.nav .add-btn {
    background: #2c7cb6;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
}
.nav .add-btn:hover {
    background: #1f6290;
    color: white;
}
.back-btn {
    background: #eef4fc;
    padding: 0.5rem 1.2rem;
    border-radius: 40px;
    margin-right: 1rem;
    cursor: pointer;
    display: inline-block;
}

.hero-full-image {
    width: 100%;
    position: relative;
    margin-bottom: 0;
    line-height: 0;
}
.hero-full-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 35vh;
}

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

.section-title {
    font-size: 1.8rem;
    color: #1a5a8a;
    border-left: 5px solid #2c7cb6;
    padding-left: 1rem;
    margin: 2rem 0 1.5rem 0;
}
.heroes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.hero-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #cde3f0;
    transition: 0.2s;
    cursor: pointer;
}
.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}
.hero-photo {
    height: 380px;
    background: #d9e8f3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-photo .no-photo {
    font-size: 48px;
    color: #7fb4d4;
}
.hero-info {
    padding: 1.2rem;
}
.hero-info h3 {
    font-size: 1.2rem;
    color: #134b6e;
    margin-bottom: 0.3rem;
}
.hero-rank {
    color: #2c7cb6;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}
.hero-dates {
    font-size: 0.8rem;
    color: #6b8da8;
    margin-top: 0.5rem;
    display: flex;
    gap: 1rem;
}

.alphabet-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0 2rem 0;
    background: white;
    padding: 1rem;
    border-radius: 3rem;
    border: 1px solid #cde3f0;
}
.alpha-btn {
    background: #eef4fc;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-weight: 600;
    color: #1a5a8a;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}
.alpha-btn:hover {
    background: #2c7cb6;
    color: white;
}
.alpha-btn.active {
    background: #2c7cb6;
    color: white;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.page-btn {
    background: #eef4fc;
    border: none;
    min-width: 40px;
    height: 40px;
    padding: 0 0.8rem;
    border-radius: 2rem;
    font-weight: 500;
    color: #1a5a8a;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
}
.page-btn:hover {
    background: #2c7cb6;
    color: white;
}
.page-btn.active {
    background: #2c7cb6;
    color: white;
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination-info {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #6b8da8;
}

/* СТРАНИЦА ГЕРОЯ - БИОГРАФИЯ ВНИЗУ */
.hero-page {
    background: white;
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid #cde3f0;
}
.hero-page-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.hero-page-left {
    background: #d9e8f3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.hero-page-photo {
    width: 100%;
    max-width: 300px;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}
.hero-page-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-page-photo .no-photo {
    font-size: 120px;
    color: #7fb4d4;
    display: block;
    text-align: center;
}
.candle-container {
    text-align: center;
    margin-top: 2rem;
}
.candle {
    width: 60px;
    height: 100px;
    margin: 0 auto;
    position: relative;
}
.candle-body {
    width: 40px;
    height: 70px;
    background: #f5e6c8;
    border-radius: 10px 10px 5px 5px;
    position: absolute;
    bottom: 0;
    left: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.candle-wick {
    width: 3px;
    height: 15px;
    background: #333;
    position: absolute;
    bottom: 70px;
    left: 28px;
}
.candle-flame {
    width: 20px;
    height: 30px;
    background: #ffaa00;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    bottom: 80px;
    left: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 0 20px #ffaa00;
    pointer-events: none;
}
.candle-flame.lit {
    opacity: 1;
    animation: flicker 0.3s infinite alternate;
}
@keyframes flicker {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}
.candle-btn {
    background: #2c7cb6;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 0.9rem;
}
.candle-btn:hover {
    background: #1f6290;
}
.hero-page-right {
    padding: 2rem;
}
.hero-page-name {
    font-size: 2rem;
    color: #134b6e;
    margin-bottom: 1rem;
}
.hero-page-rank {
    font-size: 1.2rem;
    color: #2c7cb6;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #cde3f0;
}
.hero-page-info {
    margin: 1rem 0;
}
.info-row {
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.info-label {
    font-weight: 700;
    color: #1a5a8a;
    width: 120px;
}
.info-value {
    color: #2c3e50;
    flex: 1;
}
.awards-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #cde3f0;
}
.awards-section h4 {
    color: #1a5a8a;
    margin-bottom: 0.5rem;
}
.awards-list {
    list-style: none;
    padding-left: 0;
}
.awards-list li {
    padding: 0.3rem 0;
    color: #2c3e50;
}
.awards-list li i {
    color: #ffc107;
    margin-right: 0.5rem;
}
.hero-bio-section {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    border-top: 2px solid #cde3f0;
    background: #fafcfd;
}
.hero-bio-section h3 {
    color: #1a5a8a;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.hero-bio-section p {
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    max-width: 500px;
    width: 90%;
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    border-top: 8px solid #2c7cb6;
}
.vk-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #0077ff;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin: 1rem 0;
}
.close-modal {
    background: #2c7cb6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    cursor: pointer;
}

.footer {
    text-align: center;
    padding: 2rem;
    background: #eef4fc;
    margin-top: 3rem;
    color: #3d6b8c;
    border-top: 1px solid #cae3f2;
}

@media (max-width: 900px) {
    .heroes-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-page-top { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .heroes-grid { grid-template-columns: 1fr; }
    .header-container { flex-direction: column; text-align: center; }
    .page-btn { min-width: 35px; height: 35px; font-size: 0.8rem; }
}