/* === ОБЩИЕ СТИЛИ === */
:root {
    --primary: #1a140f;
    --secondary: #d4af37;
    --light: #f5f5dc;
    --dark: #12100e;
    --gold: #ffd700;
    --gold-light: #f0e68c;
    --gold-dark: #b8860b;
    --light-beige: #f8f1e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: var(--primary);
    color: var(--light-beige);
    overflow-x: hidden;
    line-height: 1.6;
}

/* === ПРЕЛОАДЕР === */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    text-align: center;
    position: relative;
}

.preloader-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    position: relative;
}

.preloader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.magic-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.magic-circle:nth-child(2) {
    animation-delay: -0.5s;
}

.magic-circle:nth-child(3) {
    animation-delay: -1s;
}

.preloader-text {
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: 25px;
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.preloader-text span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: textAppear 1.5s forwards;
}

.progress-container {
    width: 300px;
    height: 4px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--gold-light), var(--gold));
    border-radius: 2px;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px var(--gold);
}

/* === НАВИГАЦИЯ === */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    background: rgba(26, 20, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: all 0.5s ease;
}

nav.scrolled {
    padding: 12px 0;
    box-shadow: 0 5px 20px rgba(18, 16, 14, 0.7);
    background: rgba(26, 20, 15, 0.98);
}

.nav-container {
    width: 90%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 50px;
}

.logo-image {
    height: 50px;
    transition: transform 0.3s ease;
}

.logo:hover .logo-image {
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 3px;
    background-color: var(--light);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* === СЕКЦИИ === */
section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    position: relative;
    overflow: hidden;
}

.section-content {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    z-index: 2;
}

#home {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards 0.8s;
    font-weight: 300;
}

.cta-button {
    display: inline-block;
    padding: 16px 45px;
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards 1.1s;
}

.cta-button:hover {
    color: var(--dark);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gold);
    transition: width 0.5s ease;
    z-index: -1;
}

.cta-button:hover::before {
    width: 100%;
}

.hero-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.5;
    filter: sepia(50%) brightness(0.7) contrast(1.1);
}

/* === О ПРОЕКТЕ === */
#about {
    background: linear-gradient(45deg, var(--primary) 0%, #231c15 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards 0.3s;
}

.section-header h2 {
    font-size: 2.8rem;
    color: var(--gold);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-family: 'Cinzel', serif;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--gold-light);
    max-width: 700px;
    margin: 30px auto 0;
    line-height: 1.8;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.about-card {
    background: rgba(26, 20, 15, 0.6);
    border-radius: 15px;
    padding: 40px;
    width: calc(50% - 20px);
    min-width: 300px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 30px rgba(18, 16, 14, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s ease;
}

.about-card:nth-child(1) {
    animation: fadeUp 1s forwards 0.6s;
}

.about-card:nth-child(2) {
    animation: fadeUp 1s forwards 0.9s;
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: rgba(212, 175, 55, 0.6);
}

.card-header {
    margin-bottom: 25px;
}

.card-title {
    font-size: 1.8rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 15px;
}

.card-content p {
    margin-bottom: 25px;
    line-height: 1.8;
}

.forum-button {
    display: inline-block;
    padding: 14px 35px;
    background: var(--gold);
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.forum-button:hover {
    transform: translateY(-3px);
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}

/* === ТОП ИГРОКОВ === */
#top-players {
    background: linear-gradient(45deg, #1e1812 0%, #2a2118 100%);
    min-height: auto;
    padding: 80px 20px;
}

.top-table-container {
    background: rgba(30, 25, 20, 0.95);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 1000px;
    border: 2px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.table-header {
    display: grid;
    grid-template-columns: 80px 1fr 150px 150px;
    background: var(--gold-dark);
    font-weight: bold;
    padding: 18px 25px;
    color: var(--dark);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Cinzel', serif;
}

.player-row {
    display: grid;
    grid-template-columns: 80px 1fr 150px 150px;
    padding: 18px 25px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: rgba(40, 35, 30, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.player-row:last-child {
    border-bottom: none;
}

.player-row:hover {
    background: rgba(60, 55, 50, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.rank-cell {
    font-weight: bold;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    color: var(--gold);
    font-family: 'Cinzel', serif;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.player-cell {
    padding-left: 15px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--light-beige);
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.class-cell {
    color: var(--gold-light);
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 1.1rem;
}

.points-cell {
    text-align: right;
    font-weight: bold;
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    position: relative;
}

.class-icon {
    width: 36px;
    height: 36px;
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 50%;
    background-color: rgba(30, 25, 20, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: var(--gold);
    border: 2px solid var(--gold);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

/* Стили для сообщений об ошибке */
.player-row.error-row {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 30px;
    color: var(--gold-light);
    font-size: 1.3rem;
    background: rgba(255, 50, 50, 0.1);
    border-radius: 8px;
    margin: 10px;
}

/* === СЕКЦИЯ НАГРАД === */
.rewards-section {
    background: rgba(26, 20, 15, 0.6);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.rewards-section h3 {
    font-size: 1.8rem;
    color: var(--gold);
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Cinzel', serif;
    position: relative;
}

.rewards-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.reward-card {
    background: rgba(42, 35, 30, 0.5);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.reward-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.reward-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background-size: contain;
    background-repeat: no-repeat;
}

.reward-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--gold);
    font-size: 1.1rem;
}

.reward-card div {
    color: var(--gold-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* === КОНТРОЛЛЫ ТОПА === */
.top-controls {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 20px;
}

.refresh-button, .full-top-button {
    display: inline-block;
    padding: 16px 40px;
    background: var(--gold);
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-shadow: none;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.refresh-button:hover, .full-top-button:hover {
    transform: translateY(-5px);
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* === ПОДВАЛ === */
#footer {
    min-height: 60vh;
    background: var(--dark);
    padding: 80px 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    justify-content: space-between;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
}

.footer-logo h3 {
    font-size: 2.2rem;
    color: var(--gold);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.footer-logo-img {
    height: 40px;
    margin-right: 15px;
}

.footer-logo p {
    line-height: 1.8;
    max-width: 400px;
}

.footer-links {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: space-between;
}

.link-group h4 {
    font-size: 1.3rem;
    color: var(--gold);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.link-group h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gold);
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 15px;
}

.link-group a {
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.link-group a i {
    margin-right: 10px;
    color: var(--gold);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.link-group a:hover {
    color: var(--gold);
    transform: translateX(5px);
}

.link-group a:hover i {
    transform: scale(1.2);
}

.copyright {
    text-align: center;
    margin-top: 80px;
    padding-top: 30px;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    color: var(--gold);
    font-size: 0.9rem;
}

/* === АНИМАЦИИ === */
@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

@keyframes textAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === ДОПОЛНИТЕЛЬНЫЕ СТИЛИ === */
.lazyload {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazyload.loaded {
    opacity: 1;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 992px) {
    .table-header, .player-row {
        grid-template-columns: 70px 1fr 100px;
    }
    .class-cell {
        display: none;
    }
    
    .about-card {
        width: 100%;
    }
    
    .rewards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .table-header, .player-row {
        grid-template-columns: 60px 1fr 90px;
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .top-table-container {
        overflow-x: auto;
    }
    
    .top-table {
        min-width: 500px;
    }
    
    .rank-cell {
        font-size: 1.5rem;
    }
    
    .player-cell {
        font-size: 1.1rem;
    }
    
    .points-cell {
        font-size: 1.3rem;
    }
    
    .refresh-button, .full-top-button {
        padding: 14px 30px;
        font-size: 1.1rem;
    }
    
    .player-row.error-row {
        padding: 20px 15px;
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: rgba(18, 16, 14, 0.98);
        width: 100%;
        height: calc(100vh - 80px);
        padding: 40px 20px;
        transition: all 0.5s ease;
        backdrop-filter: blur(10px);
        z-index: 99;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }
    
    .nav-links a {
        font-size: 1.3rem;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 40px;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .top-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .refresh-button, .full-top-button {
        width: 100%;
        max-width: 300px;
    }
    
    /* Отключение сложных эффектов для мобильных */
    .about-card:hover {
        transform: none;
    }
    .forum-button:hover {
        transform: none;
    }

    /* Адаптив прелоадера */
    .preloader-logo {
        width: 80px;
        height: 80px;
    }
    .preloader-text {
        font-size: 1.2rem;
    }
    .progress-container {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .table-header, .player-row {
        grid-template-columns: 50px 1fr 80px;
        font-size: 0.95rem;
        padding: 12px 15px;
    }
    
    .rank-cell {
        font-size: 1.3rem;
    }
    
    .class-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    #top-players {
        padding: 60px 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .logo-image {
        height: 35px;
    }
    
    .about-card {
        padding: 30px 20px;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .hero-image {
        filter: brightness(0.7) contrast(1.1);
    }
    
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    .reward-card {
        max-width: 250px;
        margin: 0 auto;
    }

    /* Адаптив прелоадера */
    .preloader-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    .preloader-text {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    .progress-container {
        width: 180px;
    }
}
/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-item {
    margin: 5px;
}

.page-link {
    display: block;
    padding: 10px 15px;
    background: var(--gold);
    color: var(--dark);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.page-link:hover {
    background: var(--gold-dark);
    transform: translateY(-3px);
}

.page-link.active {
    background: var(--gold-dark);
    color: var(--light);
}

.page-link.disabled {
    background: rgba(212, 175, 55, 0.3);
    cursor: not-allowed;
}

.page-info {
    text-align: center;
    margin-top: 20px;
    color: var(--gold-light);
    font-size: 1.1rem;
}

/* Подключение шрифта Cinzel для заголовков */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');