@import url('https://fonts.googleapis.com/css2?family=Zhi+Mang+Xing&family=Cinzel:wght@400;700&family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;600;700&display=swap');

:root {
    --bg-paper: #f4f1ea;
    --ink-primary: #1a1a1a;
    --ink-wash: #4a5568;
    --seal-red: #be123c;
    --paper-texture: url('https://www.transparenttextures.com/patterns/rice-paper-2.png');
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: var(--bg-paper);
    background-image: var(--paper-texture);
    color: var(--ink-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .ink-title, .brand {
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--ink-primary);
}

.btn-hero, footer, .links a, .role-tag, .banner-overlay p, .main-title span {
    font-family: 'Cinzel', serif;
    font-weight: 700;
}

.red-sub {
    font-family: 'Ma Shan Zheng', cursive;
    color: var(--seal-red);
    font-size: 1.25rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
    display: block;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.8;
}

.gold-divider {
    width: 80px;
    height: 3px;
    background: var(--ink-primary);
    margin: 20px auto 0;
    position: relative;
    opacity: 0.8;
}

.gold-divider::after {
    content: '◈';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--seal-red);
    background: var(--bg-paper);
    padding: 0 10px;
    font-size: 14px;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s ease;
    background: transparent;
}

.nav-left {
    display: flex;
    align-items: center;
}

.brand {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--ink-primary);
    text-decoration: none;
    margin-right: 50px;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
    letter-spacing: 1px;
}

.links {
    display: flex;
    position: static;
    width: auto;
    height: auto;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    flex-direction: row;
}

.links a {
    color: var(--ink-wash);
    text-decoration: none;
    margin-right: 35px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: 0.3s;
    position: relative;
    display: inline-block;
    padding: 0;
    border-bottom: none;
    width: auto;
}

.links a:hover {
    color: var(--seal-red);
}

.links a:last-child {
    margin-right: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    position: static;
    background: transparent;
    padding: 0;
    border: none;
}

.cabinet-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    border: 2px solid var(--ink-wash);
    border-radius: 4px;
    text-decoration: none;
    color: var(--ink-primary);
    font-weight: 700;
    font-size: 12px;
    transition: 0.3s;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    white-space: nowrap;
}

.cabinet-btn:hover {
    background: var(--seal-red);
    color: #fff;
    border-color: var(--seal-red);
}

.lang-switch {
    display: flex;
    gap: 0;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--ink-wash);
    color: var(--ink-wash);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.lang-btn:first-child {
    border-radius: 4px 0 0 4px;
    border-right: none;
}

.lang-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.lang-btn.active {
    background: var(--seal-red);
    border-color: var(--seal-red);
    color: #fff;
}

.navbar.scrolled {
    background: var(--bg-paper);
    background-image: var(--paper-texture);
    padding: 15px 60px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(190, 18, 60, 0.3);
}

.mobile-menu-toggle {
    display: none;
}

.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: url('../img/bg_hero.jpg') center/cover no-repeat;
    background-attachment: fixed;
    margin-top: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), rgba(244,241,234,1));
    z-index: 1;
}

.hero-content {
    z-index: 2;
    margin-top: -30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: var(--max-width);
}

.main-title {
    font-size: clamp(3.5rem, 8vw, 6rem);
    color: var(--ink-primary);
    margin-bottom: 20px;
    line-height: 1;
    letter-spacing: 2px;
    text-shadow: 2px 2px 15px rgba(255,255,255,0.8);
    font-weight: 700;
}

.main-title span {
    color: var(--seal-red);
    font-size: clamp(2.5rem, 6vw, 5rem);
    display: block;
    margin-top: 10px;
    letter-spacing: clamp(5px, 1vw, 15px);
    text-transform: uppercase;
    text-shadow: 2px 2px 0 #fff;
}

.hero-seal {
    width: 60px;
    height: 60px;
    background: var(--seal-red);
    color: #fff;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin: 0 auto 30px;
    border: 3px double rgba(255,255,255,0.5);
    box-shadow: 0 5px 15px rgba(190, 18, 60, 0.4);
}

.hero-desc {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--ink-primary);
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.2rem);
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

.btn-hero {
    display: inline-block;
    padding: 15px 50px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
    letter-spacing: 2px;
    background: var(--seal-red);
    color: #fff;
    box-shadow: 0 5px 20px rgba(190, 18, 60, 0.3);
}

.btn-hero:hover {
    background: #9f1239;
    transform: translateY(-3px);
}

.torn-bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--bg-paper) 20%, transparent 100%);
    z-index: 5;
}

.bonus-section {
    padding: 60px 20px 100px;
    text-align: center;
}

.bonus-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 50px auto 0;
    flex-wrap: wrap;
    max-width: var(--max-width);
}

.bonus-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 100px;
}

.lantern-body {
    position: relative;
    width: 70px;
    height: 90px;
    background: #fff;
    border: 2px solid var(--seal-red);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transition: 0.4s;
}

.lantern-body::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 20px;
    background: var(--ink-primary);
    z-index: -1;
}

.lantern-center {
    font-size: 28px;
    color: var(--seal-red);
}

.bonus-card:hover {
    transform: translateY(-10px);
}

.bonus-card:hover .lantern-body {
    background: var(--seal-red);
}

.bonus-card:hover .lantern-center {
    color: #fff;
}

.bonus-card span {
    color: var(--ink-primary);
    font-weight: 700;
    font-size: 13px;
    font-family: 'Cinzel', serif;
}

.news-section {
    padding: 80px 20px;
    background: transparent;
    display: flex;
    justify-content: center;
}

.news-wrapper {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 480px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-radius: 2px;
    overflow: hidden;
}

.news-banner {
    flex: 0.9;
    position: relative;
    overflow: hidden;
    min-height: 300px;
}

.news-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s;
}

.news-wrapper:hover .news-banner img {
    transform: scale(1.05);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.banner-overlay h2 {
    font-size: 2.2rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    margin-bottom: 5px;
    color: #fff;
    letter-spacing: 1px;
}

.banner-overlay p {
    color: #ddd;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.news-list-block {
    flex: 1.4;
    padding: 40px;
    display: flex;
    flex-direction: column;
    color: var(--ink-primary);
    background-image: var(--paper-texture);
}

.news-header {
    border-bottom: 2px solid var(--ink-primary);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-header h3 {
    font-size: 1.8rem;
    letter-spacing: 1px;
    margin: 0;
}

.news-header a {
    font-size: 12px;
    color: var(--seal-red);
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

.news-items li {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px dashed #ccc;
    font-size: 15px;
    color: var(--ink-wash);
    transition: 0.3s;
    cursor: pointer;
}

.news-items li:hover {
    color: var(--ink-primary);
    padding-left: 10px;
    border-bottom-color: var(--seal-red);
    background: rgba(190, 18, 60, 0.05);
}

.n-date {
    color: #999;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

.soc-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.soc {
    flex: 1;
    padding: 12px;
    text-align: center;
    color: var(--ink-wash);
    font-size: 12px;
    font-weight: 700;
    border-radius: 2px;
    transition: 0.3s;
    border: 1px solid #ddd;
    font-family: 'Cinzel', serif;
}

.soc:hover {
    background: var(--ink-primary);
    color: #fff;
    border-color: var(--ink-primary);
}

.features-section {
    padding: 100px 20px;
    text-align: center;
    background: url('../img/bg_features.jpg') center/cover no-repeat;
    position: relative;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(244, 241, 234, 0.9);
}

.sec-header, .features-grid {
    position: relative;
    z-index: 2;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.f-card {
    height: 260px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: 0.5s;
    border: 6px solid #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    filter: grayscale(0.8) contrast(1.1);
}

.f-card:hover {
    border-color: #fff;
    transform: translateY(-5px) scale(1.02);
    filter: grayscale(0) contrast(1);
}

.f-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.f-content h3 {
    color: var(--ink-primary);
    font-size: 1.4rem;
    margin-bottom: 0;
    letter-spacing: 2px;
}

.classes-section {
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
    background: url('../img/bg_classes.jpg') center/cover no-repeat;
    background-attachment: fixed;
    position: relative;
}

.classes-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #3b3b2f7a 0%, rgb(0 0 0 / 40%) 15%, rgba(255, 255, 255, 0.4) 85%, #3b3b2f7a 100%);
    pointer-events: none;
}

.slider-container, .classes-section .sec-header {
    position: relative;
    z-index: 2;
}

.race-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto 40px;
    position: relative;
    z-index: 10;
}

.race-btn {
    padding: 12px 40px;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    background: transparent;
    border: 2px solid var(--ink-primary);
    color: var(--ink-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
    letter-spacing: 2px;
}

.race-btn:hover {
    border-color: var(--seal-red);
    color: var(--seal-red);
}

.race-btn.active {
    background: var(--seal-red);
    border-color: var(--seal-red);
    color: #fff;
}

.race-container {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.race-container.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.group-grid {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    width: 100%;
    padding: 10px 0 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--seal-red) var(--bg-paper);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.group-grid::-webkit-scrollbar {
    height: 6px;
}

.group-grid::-webkit-scrollbar-track {
    background: var(--bg-paper);
}

.group-grid::-webkit-scrollbar-thumb {
    background-color: var(--seal-red);
    border-radius: 20px;
}

.flip-card {
    flex: 0 0 220px;
    background-color: transparent;
    width: 220px;
    height: 360px;
    perspective: 1000px;
    margin-top: 10px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 4px;
    border: 1px solid #eaeaea;
    overflow: hidden;
}

.flip-card-front {
    background: #fff;
}

.char-img-wrap {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 380px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.char-img-wrap img {
    max-height: 100%;
    object-fit: contain;
    filter: contrast(1.1);
}

.class-info-front {
    position: absolute;
    bottom: 15px;
    width: 90%;
    left: 5%;
    padding: 10px;
    text-align: center;
    background: rgba(255,255,255,0.9);
    border: 1px solid #eee;
    border-radius: 2px;
}

.role-icon {
    font-size: 18px;
    color: var(--seal-red);
}

.class-info-front h3 {
    color: var(--ink-primary);
    font-size: 1.3rem;
    margin: 5px 0;
    letter-spacing: 1px;
}

.class-info-front p {
    color: var(--ink-wash);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: 'Cinzel', serif;
}

.flip-card-back {
    background: var(--bg-paper);
    background-image: var(--paper-texture);
    color: var(--ink-primary);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ink-primary);
}

.back-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: center;
}

.back-icon {
    font-size: 35px;
    color: var(--seal-red);
    margin-bottom: 15px;
}

.back-content h3 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.sep-small {
    width: 40px;
    height: 2px;
    background: var(--seal-red);
    margin: 0 auto 15px;
    opacity: 0.7;
}

.back-content p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-wash);
    margin-bottom: 25px;
    font-weight: 600;
}

.role-tag {
    display: inline-block;
    padding: 6px 18px;
    background: var(--ink-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 1px;
}

.classes-slider-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.info-section {
    padding: 100px 20px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.info-block {
    display: flex;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto 120px;
    gap: 80px;
    padding: 0 10px;
    position: relative;
}

.info-text {
    flex: 1;
    position: relative;
}

.info-text::before {
    content: '仙侠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 18rem;
    color: var(--ink-primary);
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
    white-space: nowrap;
}

.info-text h2 {
    font-size: 3rem;
    margin: 5px 0 25px;
    color: var(--ink-primary);
    line-height: 1.1;
    letter-spacing: 1px;
}

.info-text p {
    color: var(--ink-wash);
    line-height: 1.9;
    font-size: 16px;
}

.info-img {
    flex: 1.1;
    height: 380px;
    position: relative;
    filter: drop-shadow(0 15px 30px rgba(26, 26, 26, 0.1));
}

.info-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    box-shadow: none;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transition: 0.5s ease;
    filter: sepia(0.1) contrast(1.05);
}

.info-block:hover .info-img img {
    border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    transform: scale(1.02);
}

.cta-section {
    padding: 120px 20px;
    text-align: center;
    position: relative;
    color: #fff;
    margin-top: 80px;
    background: url('../img/bg_cta.jpg') bottom center/cover no-repeat;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #1f1b13 0%, rgba(26, 26, 26, 0.8) 20%, rgba(26, 26, 26, 0.95) 100%);
}

.cta-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-container h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    margin: 15px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    letter-spacing: 2px;
}

.sep-line {
    width: 80px;
    height: 2px;
    background: var(--seal-red);
    margin: 0 auto 30px;
}

.btn-solid {
    background: var(--seal-red);
    color: #fff;
    padding: 12px 40px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    display: inline-block;
}

.btn-ghost {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 12px 40px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 700;
    transition: 0.3s;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    display: inline-block;
}

.btn-solid:hover {
    background: #9f1239;
}

.btn-ghost:hover {
    background: #fff;
    color: #000;
}

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: 1s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.anim-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: 1s ease;
}

.anim-right {
    opacity: 0;
    transform: translateX(50px);
    transition: 1s ease;
}

.visible {
    opacity: 1;
    transform: translateX(0);
}

footer {
    background: #1a1a1a;
    padding: 40px;
    text-align: center;
    color: #666;
    font-size: 12px;
    border-top: 1px solid #333;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-paper);
    background-image: var(--paper-texture);
    max-width: 500px;
    width: 90%;
    border: 3px solid var(--seal-red);
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(190, 18, 60, 0.3);
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 2px solid var(--ink-primary);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 2rem;
    color: var(--ink-primary);
    letter-spacing: 2px;
    margin: 0;
    font-family: 'Noto Serif SC', serif;
}

.modal-header h3 span {
    color: var(--seal-red);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.8rem;
    margin-left: 10px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--ink-wash);
    color: var(--ink-wash);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-family: 'Cinzel', serif;
}

.modal-close:hover {
    background: var(--seal-red);
    border-color: var(--seal-red);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.download-btn {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 4px;
    text-decoration: none;
    color: var(--ink-primary);
    font-weight: 700;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.download-btn:hover {
    border-color: var(--seal-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(190, 18, 60, 0.2);
}

.download-btn:active {
    transform: translateY(0);
}

.download-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-paper);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 24px;
    color: var(--seal-red);
    transition: all 0.3s;
}

.download-btn:hover .download-icon {
    background: var(--seal-red);
    color: #fff;
}

.download-info {
    flex: 1;
}

.download-info h4 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--ink-primary);
    font-family: 'Cinzel', serif;
}

.download-info p {
    color: var(--ink-wash);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.download-info p i {
    color: var(--seal-red);
    margin-right: 5px;
}

.download-size {
    font-family: 'Cinzel', serif;
    background: var(--bg-paper);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
}

.download-arrow {
    font-size: 24px;
    color: var(--ink-wash);
    transition: all 0.3s;
    margin-left: 15px;
}

.download-btn:hover .download-arrow {
    color: var(--seal-red);
    transform: translateX(5px);
}

.modal-footer {
    padding: 20px 30px 25px;
    border-top: 1px dashed rgba(74, 85, 104, 0.3);
    text-align: center;
}

.modal-footer p {
    color: var(--ink-wash);
    font-size: 13px;
    margin-bottom: 10px;
}

.system-req {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    font-size: 12px;
    color: var(--ink-primary);
    font-family: 'Cinzel', serif;
}

.system-req span i {
    color: var(--seal-red);
    margin-right: 5px;
}

.modal-seal {
    position: absolute;
    top: -15px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--seal-red);
    color: #fff;
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 3px double rgba(255,255,255,0.5);
    transform: rotate(10deg);
    box-shadow: 0 5px 15px rgba(190, 18, 60, 0.4);
    z-index: 1;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

@media (max-width: 992px) {
    .navbar {
        padding: 20px 30px;
    }
    .main-title {
        font-size: 4rem;
    }
    .main-title span {
        font-size: 4.5rem;
    }
    .news-wrapper {
        flex-direction: column;
        height: auto;
    }
    .news-banner {
        height: 300px;
        flex: none;
    }
    .info-block {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
        background: var(--bg-paper);
        background-image: var(--paper-texture);
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .brand {
        font-size: 1.3rem;
        margin: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 25px;
        height: 18px;
        cursor: pointer;
        z-index: 1001;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--ink-primary);
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        background: var(--bg-paper);
        background-image: var(--paper-texture);
        flex-direction: column;
        padding: 20px 0;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        border-top: 2px solid var(--seal-red);
    }
    
    .links.active {
        left: 0;
    }
    
    .links a {
        margin: 0;
        padding: 15px 20px;
        font-size: 16px;
        border-bottom: 1px solid rgba(190, 18, 60, 0.1);
        width: 100%;
        text-align: left;
        display: block;
    }
    
    .links a:last-child {
        border-bottom: none;
    }
    
    .nav-right {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .cabinet-btn {
        padding: 8px 15px;
        font-size: 11px;
        white-space: nowrap;
        background: rgba(190, 18, 60, 0.1);
        border-color: var(--seal-red);
    }
    
    .cabinet-btn i {
        margin-right: 4px;
    }
    
    .lang-switch {
        display: flex;
        gap: 0;
    }
    
    .lang-btn {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .lang-btn:first-child {
        border-radius: 4px 0 0 4px;
    }
    
    .lang-btn:last-child {
        border-radius: 0 4px 4px 0;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .hero {
        margin-top: 70px;
    }
    
    .race-tabs {
        display: none;
    }
    
    .mobile-race-slider {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
        margin: 20px auto 30px;
        position: relative;
        z-index: 10;
    }
    
    .mobile-race-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--bg-paper);
        border: 2px solid var(--seal-red);
        color: var(--seal-red);
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(190, 18, 60, 0.2);
    }
    
    .mobile-race-btn:active {
        background: var(--seal-red);
        color: #fff;
        transform: scale(0.95);
    }
    
    .mobile-race-btn.disabled {
        opacity: 0.3;
        pointer-events: none;
        border-color: var(--ink-wash);
        color: var(--ink-wash);
    }
    
    .mobile-race-name {
        font-family: 'Cinzel', serif;
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--ink-primary);
        min-width: 100px;
        text-align: center;
        letter-spacing: 2px;
    }
    
    .mobile-race-name span {
        color: var(--seal-red);
        font-family: 'Ma Shan Zheng', cursive;
        margin-left: 5px;
    }
    
    .classes-slider-container {
        padding: 0 35px;
    }
    
    .slider-arrow {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: var(--bg-paper);
        border: 2px solid var(--seal-red);
        color: var(--seal-red);
        font-size: 14px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 20;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(190, 18, 60, 0.2);
    }
    
    .slider-arrow:active {
        background: var(--seal-red);
        color: #fff;
        transform: translateY(-50%) scale(0.95);
    }
    
    .slider-arrow.left {
        left: 0;
    }
    
    .slider-arrow.right {
        right: 0;
    }
    
    .slider-arrow.disabled {
        opacity: 0.3;
        pointer-events: none;
        border-color: var(--ink-wash);
        color: var(--ink-wash);
    }
.group-grid {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    width: 100%;
    padding: 10px 0 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Скрыть скроллбар но оставить функционал */
}

.group-grid::-webkit-scrollbar {
    display: none; /* Скрыть скроллбар для Chrome/Safari */
}
}

@media (min-width: 769px) {
.group-grid {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    flex-wrap: nowrap;
    width: 100%;
    padding: 10px 0 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Скрыть скроллбар но оставить функционал */
}

.group-grid::-webkit-scrollbar {
    display: none; /* Скрыть скроллбар для Chrome/Safari */
}
    .mobile-race-slider {
        display: none;
    }
    
    .slider-arrow {
        display: none !important;
    }
}