/* ===== БАЗОВЫЕ СТИЛИ ===== */
:root {
    --primary-dark: #0d1117;
    --secondary-dark: #161b22;
    --card-dark: #21262d;
    --border-dark: #30363d;
    --border-light: #6e7681;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-light: #f0f6fc;
    --accent-red: #da3633;
    --accent-red-dark: #b92525;
    --accent-red-light: #f85149;
    --accent-green: #3fb950;
    --accent-blue: #1f6feb;
    --accent-purple: #8957e5;
    --accent-gold: #e3b341;
    --discord-blue: #5865f2;
    --discord-blue-dark: #4752c4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background: var(--primary-dark);
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

/* ===== ТИПОГРАФИЯ ===== */
h1, h2, h3, h4, .logo-main, .footer-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* ===== КНОПКИ ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
    min-height: 3rem;
    width: auto;
    text-align: center;
    white-space: nowrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    min-height: 3.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-red-dark));
    color: white;
    border: 1px solid rgba(218, 54, 51, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-red-light), var(--accent-red));
    transform: translateY(-0.125rem);
    box-shadow: 0 0.375rem 1rem rgba(218, 54, 51, 0.3);
    border-color: rgba(218, 54, 51, 0.5);
}

.btn-secondary {
    background: rgba(33, 38, 45, 0.8);
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
}

.btn-secondary:hover {
    background: rgba(48, 54, 61, 0.8);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2);
    border-color: var(--border-light);
}

.btn-icon {
    width: 1.125rem;
    height: 1.125rem;
    fill: currentColor;
}

/* ===== НАВИГАЦИЯ (ОБНОВЛЕННАЯ) ===== */
.main-nav {
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(0.625rem);
    border-bottom: 1px solid var(--border-dark);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    height: 4.375rem;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Кнопка мобильного меню */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 2rem;
    height: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-left: auto; /* Сдвигаем кнопку меню влево на мобильных */
}

.mobile-menu-btn span {
    width: 100%;
    height: 0.1875rem;
    background: var(--text-primary);
    border-radius: 0.1875rem;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(0.65625rem) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-0.65625rem) rotate(-45deg);
}

/* Логотип слева и выровнен по центру по высоте */
.logo-center {
    position: absolute;
    left: 1.25rem;
    transform: none;
    z-index: 100;
    display: flex;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo-img-container {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5);
    margin-bottom: 0; /* Убираем нижний отступ */
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.125rem;
    display: none; /* Скрываем подпись под логотипом */
}

/* Навигационные ссылки (разделенные) */
.nav-links {
    display: flex;
    gap: 0.125rem;
    flex: 1;
}

.nav-left {
    justify-content: flex-start;
    margin-left: 140px; /* Отступ для логотипа слева */
}

.nav-right {
    justify-content: flex-end;
}

.nav-link {
    padding: 0.625rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-light);
    background: rgba(48, 54, 61, 0.3);
}

.nav-link.active {
    color: white;
    background: rgba(218, 54, 51, 0.2);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.0625rem;
    left: 1rem;
    right: 1rem;
    height: 0.125rem;
    background: var(--accent-red);
    border-radius: 0.0625rem;
}

/* Discord кнопка - исправленная */
.discord-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--discord-blue);
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(88, 101, 242, 0.3);
    flex-shrink: 0;
    white-space: nowrap;
}

.discord-btn:hover {
    background: var(--discord-blue-dark);
    transform: translateY(-0.125rem);
    box-shadow: 0 0.25rem 0.75rem rgba(88, 101, 242, 0.3);
}

.discord-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: white; /* Изменено на белый цвет */
}

/* Мобильное меню - исправленное положение */
.mobile-menu {
    position: fixed;
    top: 4.375rem;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    border-top: 1px solid var(--border-dark);
    padding: 1rem;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 999;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
}

.mobile-menu.active {
    display: flex;
}

.mobile-nav-link {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: white;
    background: rgba(48, 54, 61, 0.3);
}

.mobile-nav-link.discord-link {
    background: rgba(88, 101, 242, 0.1);
    color: white; /* Изменено на белый цвет */
    margin-top: 0.5rem;
}

.mobile-nav-link.discord-link:hover {
    background: rgba(88, 101, 242, 0.2);
    color: white;
}

.mobile-nav-link.discord-link svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: white; /* Изменено на белый цвет */
}

/* ===== ГЕРОЙ СЕКЦИЯ ===== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.9), rgba(22, 27, 34, 0.9));
    padding-top: 4.375rem;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(218, 54, 51, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(31, 111, 235, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 2rem 0;
}

.hero-main {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    background: linear-gradient(135deg, #fff, var(--accent-red-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.divider-line {
    width: 6rem;
    height: 0.125rem;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
}

.divider-icon {
    font-size: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--accent-red-light);
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* Статистика героя */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(33, 38, 45, 0.6);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 1.25rem;
    min-width: 9.375rem;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-0.3125rem);
    border-color: var(--accent-red);
    box-shadow: 0 0.5rem 1.5rem rgba(218, 54, 51, 0.2);
}

.stat-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Кнопки героя */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-buttons .btn {
    flex: 1;
    min-width: min(100%, 16rem);
    max-width: 20rem;
}

/* Индикатор скролла */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-0.625rem);
    }
    60% {
        transform: translateX(-50%) translateY(-0.3125rem);
    }
}

.scroll-mouse {
    width: 2.25rem;
    height: 3.5rem;
    border: 0.125rem solid var(--text-secondary);
    border-radius: 1.25rem;
    display: flex;
    justify-content: center;
    padding-top: 0.375rem;
}

.scroll-wheel {
    width: 0.25rem;
    height: 0.625rem;
    background: var(--accent-red);
    border-radius: 0.125rem;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(1rem);
        opacity: 0;
    }
}

.scroll-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== ОБЩИЕ СЕКЦИИ ===== */
section {
    padding: 4rem 0;
    scroll-margin-top: 5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.section-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: white;
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 6rem;
    height: 0.1875rem;
    background: linear-gradient(90deg, transparent, var(--accent-red), transparent);
    border-radius: 0.125rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== СЕКЦИЯ "О ГИЛЬДИИ" ===== */
.about-section {
    background: var(--secondary-dark);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0.0625rem;
    background: linear-gradient(90deg, transparent, var(--border-dark), transparent);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.about-card {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.about-card:hover {
    transform: translateY(-0.3125rem);
    border-color: var(--accent-red);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.card-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    color: white;
    margin: 0;
}

.card-content {
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.feature-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
}

.feature-list li:last-child {
    border-bottom: none;
}

.list-icon {
    font-size: 1.1rem;
    min-width: 1.5rem;
    flex-shrink: 0;
}

.alliance-banner {
    background: rgba(218, 54, 51, 0.1);
    border-left: 0.1875rem solid var(--accent-red);
    padding: 1rem;
    margin-top: 1.25rem;
    border-radius: 0 0.375rem 0.375rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alliance-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.alliance-text {
    color: var(--accent-red-light);
    font-weight: 600;
    font-size: 0.9375rem;
}

/* ===== СЕКЦИЯ "ПРАВИЛА" ===== */
.rules-section {
    background: var(--primary-dark);
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.rules-card {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.rules-card:hover {
    transform: translateY(-0.3125rem);
    border-color: var(--accent-gold);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.rules-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-dark);
}

.rules-card-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.rules-card h3 {
    font-family: 'Montserrat', sans-serif;
    color: white;
    margin: 0;
    font-size: 1.25rem;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rule-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.rule-number {
    flex-shrink: 0;
    width: 1.875rem;
    height: 1.875rem;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.rule-content {
    flex: 1;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
}

.rule-content strong {
    color: var(--accent-red-light);
}

/* ===== СЕКЦИЯ "ВСТУПЛЕНИЕ" ===== */
.join-section {
    background: var(--secondary-dark);
}

.join-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.join-card {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.join-card:hover {
    transform: translateY(-0.3125rem);
    border-color: var(--accent-blue);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.join-card-icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
}

.join-card-title {
    font-family: 'Montserrat', sans-serif;
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.join-card-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex: 1;
    font-size: 0.9375rem;
}

.join-card .btn {
    margin-top: auto;
    width: 100%;
    max-width: 12.5rem;
}

.channel-box,
.guild-box {
    background: rgba(33, 38, 45, 0.6);
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.channel-prefix,
.guild-icon {
    color: var(--accent-red-light);
    font-weight: 700;
    flex-shrink: 0;
}

.channel-name,
.guild-name {
    color: white;
    font-weight: 500;
    font-size: 0.9375rem;
    word-break: break-word;
}

.process-box {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 50rem;
    margin: 0 auto;
}

.process-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.process-icon {
    font-size: 1.5rem;
}

.process-list {
    list-style: none;
    counter-reset: process-counter;
    margin-bottom: 2rem;
}

.process-list li {
    counter-increment: process-counter;
    padding: 0.75rem 0 0.75rem 3rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.process-list li:last-child {
    border-bottom: none;
}

.process-list li::before {
    content: counter(process-counter);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1.875rem;
    height: 1.875rem;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.process-note {
    background: rgba(31, 111, 235, 0.1);
    border-left: 0.1875rem solid var(--accent-blue);
    padding: 1rem;
    border-radius: 0 0.5rem 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.note-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.process-note p {
    color: var(--text-primary);
    margin: 0;
    line-height: 1.7;
    font-size: 0.9375rem;
}

/* ===== КАЛЬКУЛЯТОР ===== */
.calculator-main {
    padding: 6rem 0 4rem;
    background: var(--primary-dark);
    min-height: 100vh;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.calculator-title {
    font-family: 'Montserrat', sans-serif;
    color: white;
    margin-bottom: 1rem;
}

.calculator-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 37.5rem;
    margin: 0 auto;
}

/* Новая структура калькулятора */
.calculator-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 4rem;
}

.calculator-input-section {
    width: 100%;
}

.calculator-output-section {
    width: 100%;
    position: relative;
    transition: all 0.5s ease;
}

/* Панели калькулятора */
.calculator-panel {
    background: var(--card-dark);
    border: 0.125rem solid var(--border-dark);
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: auto;
    position: relative;
}

.calculator-input {
    border-color: var(--accent-red);
    box-shadow: 0 0.25rem 1.25rem rgba(218, 54, 51, 0.1);
    max-height: 1000px;
    transition: max-height 0.5s ease;
}

.calculator-output {
    border-color: var(--accent-blue);
    box-shadow: 0 0.25rem 1.25rem rgba(31, 111, 235, 0.1);
    opacity: 0;
    transform: translateY(20px);
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.calculator-output.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 800px;
    margin-top: 2rem;
}

/* Заголовок панели */
.panel-header {
    background: rgba(33, 38, 45, 0.8);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.panel-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.panel-header h2 {
    font-family: 'Montserrat', sans-serif;
    color: white;
    margin: 0;
    font-size: 1.25rem;
    flex: 1;
}

/* Кнопка очистки результатов */
.clear-results-btn {
    background: rgba(48, 54, 61, 0.6);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    border-radius: 0.375rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.clear-results-btn:hover {
    background: rgba(218, 54, 51, 0.2);
    color: var(--accent-red-light);
    border-color: var(--accent-red);
}

.clear-results-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

/* Поля ввода */
.input-group {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
    flex-shrink: 0;
}

.input-group:last-child {
    border-bottom: none;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.label-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.resources-container {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.resource-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

.resource-input {
    padding: 0.75rem;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--border-dark);
    border-radius: 0.375rem;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 0;
}

.resource-input:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 0.1875rem rgba(218, 54, 51, 0.1);
}

.name-input {
    flex: 2;
}

.amount-input {
    flex: 1;
    min-width: 5rem;
}

.remove-resource-btn {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(48, 54, 61, 0.6);
    border: 1px solid var(--border-dark);
    color: var(--text-secondary);
    border-radius: 0.375rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}

.remove-resource-btn:hover {
    background: rgba(218, 54, 51, 0.2);
    color: var(--accent-red-light);
    border-color: var(--accent-red);
}

.add-resource-btn {
    width: 100%;
    margin-top: 0.5rem;
}

#returnPercent,
#wantedItems {
    width: 100%;
    padding: 0.75rem;
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--border-dark);
    border-radius: 0.375rem;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

#returnPercent:focus,
#wantedItems:focus {
    outline: none;
    border-color: var(--accent-red);
    box-shadow: 0 0 0 0.1875rem rgba(218, 54, 51, 0.1);
}

.input-with-info {
    position: relative;
}

.input-info {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Контейнер кнопки расчета */
.calculate-button-container {
    padding: 1.5rem;
    border-top: 1px solid rgba(48, 54, 61, 0.3);
    background: rgba(33, 38, 45, 0.3);
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: auto;
}

.calculate-btn {
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
}

/* Эффект нажатия кнопки */
.calculate-btn:active {
    transform: translateY(2px);
}

/* Индикатор расчета */
.calculating-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.calculating-indicator.active {
    opacity: 1;
    visibility: visible;
}

.calculating-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid rgba(218, 54, 51, 0.3);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.calculating-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* Результаты расчета */
.results-container {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 500px;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    min-height: 300px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.25rem;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.empty-text {
    color: var(--text-secondary);
    max-width: 18.75rem;
}

/* Карточки результатов */
.result-card {
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--border-dark);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 0.25rem solid var(--accent-red);
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card:nth-child(2) {
    animation-delay: 0.1s;
    border-left-color: var(--accent-blue);
}

.result-card:nth-child(3) {
    animation-delay: 0.2s;
    border-left-color: var(--accent-purple);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(48, 54, 61, 0.3);
}

.result-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-header h3 {
    font-family: 'Montserrat', sans-serif;
    color: white;
    margin: 0;
    font-size: 1rem;
    flex: 1;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.2);
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
}

.result-value {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-align: right;
}

.result-value.goal {
    color: var(--accent-blue);
}

.result-value.success {
    color: var(--accent-green);
}

.result-value.warning {
    color: var(--accent-gold);
}

.result-value.return {
    color: var(--accent-red-light);
}

.result-value.leftover {
    color: var(--accent-purple);
}

/* Инструкция */
.instructions-section {
    background: var(--secondary-dark);
    border-radius: 0.75rem;
    padding: 3rem;
    border: 1px solid var(--border-dark);
    margin-top: 2rem;
}

.instructions-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.instructions-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 0.75rem;
}

.instructions-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.625rem), 1fr));
    gap: 1.5rem;
}

.instruction-card {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.instruction-card:hover {
    transform: translateY(-0.3125rem);
    border-color: var(--accent-red);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.instruction-number {
    position: absolute;
    top: -0.75rem;
    left: 1.25rem;
    width: 1.875rem;
    height: 1.875rem;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.instruction-content {
    padding-top: 0.5rem;
}

.instruction-content h3 {
    font-family: 'Montserrat', sans-serif;
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.instruction-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.9375rem;
}

/* ===== ФУТЕР ===== */
.main-footer {
    background: var(--secondary-dark);
    border-top: 1px solid var(--border-dark);
    padding: 2.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0 1rem;
}

.footer-logo {
    flex: 1;
    min-width: 12.5rem;
}

.footer-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.footer-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.25rem 0;
    font-size: 0.9375rem;
    white-space: nowrap;
}

.footer-link:hover {
    color: var(--accent-red-light);
}

.footer-discord-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white; /* Изменено на белый цвет */
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    background: rgba(88, 101, 242, 0.1);
    border-radius: 0.375rem;
    border: 1px solid rgba(88, 101, 242, 0.2);
    white-space: nowrap;
}

.footer-discord-link:hover {
    background: rgba(88, 101, 242, 0.2);
    color: white;
}

.footer-discord-link svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: white; /* Изменено на белый цвет */
}

/* ===== МЕДИА-ЗАПРОСЫ ===== */

/* Планшеты и маленькие ноутбуки */
@media (min-width: 1024px) {
    .calculator-layout {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .calculator-input-section {
        width: 45%;
        position: sticky;
        top: 6rem;
    }
    
    .calculator-output-section {
        width: 55%;
    }
    
    .calculator-output.show {
        margin-top: 0;
    }
}

/* Планшеты в портретной ориентации */
@media (max-width: 1023px) {
    .calculator-input-section {
        position: relative;
    }
    
    .calculator-output.show {
        margin-top: 1.5rem;
    }
}

/* Планшеты и мобильные устройства */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .main-nav {
        height: 3.75rem;
    }
    
    .nav-container {
        padding: 0 1rem;
        justify-content: flex-start; /* Выравниваем содержимое в начале */
    }
    
    .logo-img-container {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .logo-main {
        font-size: 1.25rem;
    }
    
    /* Логотип слева на мобильных */
    .logo-center {
        position: static;
        transform: none;
        height: auto;
        order: 1; /* Логотип первым */
    }
    
    /* Кнопка меню слева на мобильных */
    .mobile-menu-btn {
        display: flex;
        order: 2; /* Кнопка меню второй */
        margin-left: auto; /* Сдвигаем кнопку меню вправо */
        margin-right: 0.5rem;
    }
    
    /* Discord кнопка скрываем текст на мобильных */
    .discord-btn {
        order: 3; /* Discord кнопка третьей */
        padding: 0.5rem;
    }
    
    .discord-btn span {
        display: none;
    }
    
    /* Скрываем навигационные ссылки на мобильных */
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        top: 3.75rem;
    }
    
    .hero-section {
        padding-top: 3.75rem;
        min-height: auto;
        padding-bottom: 4rem;
    }
    
    .hero-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: stretch;
    }
    
    .stat-card {
        min-width: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 20rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .about-grid,
    .rules-grid,
    .join-cards,
    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-main {
        padding: 5rem 0 3rem;
    }
    
    .calculator-grid {
        gap: 1rem;
    }
    
    .instructions-section {
        padding: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer-logo {
        min-width: auto;
        text-align: center;
    }
}

/* Мобильные телефоны */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-main {
        padding: 0 0.5rem;
    }
    
    .hero-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-text {
        font-size: 0.9375rem;
        padding: 0 0.5rem;
    }
    
    .divider-line {
        width: 3rem;
    }
    
    .section-header,
    .instructions-header {
        padding: 0 0.5rem;
    }
    
    .about-card,
    .rules-card,
    .join-card,
    .process-box,
    .calculator-panel,
    .instruction-card {
        padding: 1.25rem;
    }
    
    .resource-row {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .name-input,
    .amount-input,
    .remove-resource-btn {
        width: 100%;
    }
    
    .remove-resource-btn {
        height: 2.75rem;
    }
    
    .instructions-section {
        padding: 1.5rem;
    }
    
    .process-list li {
        padding-left: 2.5rem;
    }
    
    .process-list li::before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
    }
    
    .scroll-indicator {
        bottom: 1rem;
    }
    
    .scroll-mouse {
        width: 1.75rem;
        height: 2.75rem;
    }
    
    .scroll-text {
        font-size: 0.75rem;
    }
    
    /* Еще меньше логотип на очень маленьких экранах */
    .logo-main {
        font-size: 1.125rem;
    }
    
    .logo-img-container {
        width: 2rem;
        height: 2rem;
    }
    
    .logo {
        gap: 0.5rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-large {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    .logo-main {
        font-size: 1rem;
    }
    
    .logo-sub {
        font-size: 0.6875rem;
    }
    
    .mobile-menu-btn {
        margin-right: 0.25rem;
    }
}