:root {
    --primary-dark: #171717;
    --primary-light: #C1BFBC;
    --primary-gray: #3A3A3A;
    --accent-color: #FFFFFF;
    --text-primary: #FFFFFF;
    --text-secondary: #C1BFBC;
    --text-tertiary: #8A8886;
    --border-color: #3A3A3A;
    --card-bg: #202020;
    --hover-bg: #2A2A2A;
}

/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-light);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 25px auto 0;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-dark);
    border-bottom: 1px solid var(--border-color);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(193, 191, 188, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(193, 191, 188, 0.03) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

.hero-logo {
    margin-bottom: 30px;
    font-size: 4.5rem;
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-itmo {
    width: 300px;
}

.floating-hand-container {
    width: 260px;
    height: 260px;
    margin: 0 auto;
}

.floating-hand {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    animation: floatAnimation 6s ease-in-out infinite;
}

.id-card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(193, 191, 188, 0.3) 0%,
        rgba(193, 191, 188, 0.1) 40%,
        transparent 70%
    );
    transform: translate(-50%, -50%);
    animation: pulseGlow 3s ease-in-out infinite;
    z-index: -1;
}

.logo-expansion {
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 16px;
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 25px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 36px;
    margin: 20px 10px;
    background-color: transparent;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 8px;
    border: 2px solid var(--primary-light);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--primary-light);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    color: var(--primary-dark);
    border-color: var(--primary-light);
}

/* Блок "Процесс захвата мира" */
.process {
    background-color: var(--primary-dark);
    border-bottom: 1px solid var(--border-color);
}

.progress-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.progress-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 35px 30px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.progress-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.progress-title {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.progress-percentage {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-light);
}

.progress-bar {
    height: 10px;
    background-color: var(--primary-gray);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px) rotate(-5deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.russia-progress {
    background-color: var(--primary-light);
}

.europe-progress {
    background-color: var(--primary-light);
}

.world-progress {
    background-color: var(--primary-light);
}

.progress-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.control-close {
    background-color: #FF5F57;
}

.control-minimize {
    background-color: #FFBD2E;
}

.control-maximize {
    background-color: #28C840;
}

/* Карта экспансии */
.map-section {
    background-color: var(--primary-dark);
    border-bottom: 1px solid var(--border-color);
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    height: 600px;
    position: relative;
    background-color: var(--card-bg);
}

#expansion-map {
    height: 100%;
    width: 100%;
}

.map-legend {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    z-index: 1000;
    max-width: 280px;
    max-height: 300px;
}

.legend-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    background-color: var(--primary-light);
    border: 2px solid var(--text-primary);
}

.legend-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legend-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.legend-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.legend-stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.legend-stat-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* Блок "Как присоединиться?" */
.join {
    background-color: var(--primary-dark);
    border-bottom: 1px solid var(--border-color);
}

.join-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.join-steps {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.step {
    display: flex;
    gap: 25px;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-dark);
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    flex-shrink: 0;
    color: var(--primary-light);
    font-family: 'JetBrains Mono', monospace;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.qr-container {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.qr-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.qr-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.7;
}

.qr-code {
    width: 220px;
    height: 220px;
    background-color: var(--primary-light);
    border-radius: 8px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--primary-dark);
}

.qr-placeholder i {
    font-size: 4rem;
}

.qr-placeholder span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Футер */
.footer {
    background-color: var(--card-bg);
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-brand {
    flex: 1;
    min-width: 300px;
    margin-right: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.footer-description, #license_link {
    color: var(--text-secondary);
    max-width: 400px;
    line-height: 1.7;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-column {
    min-width: 150px;
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-column a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.copyright {
    flex: 1;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* Адаптивность */
@media (max-width: 1024px) {
    .hero-logo {
        font-size: 3.5rem;
    }

    .floating-hand-container {
        position: relative;
        width: 300px;
        height: 300px;
        right: auto;
        bottom: auto;
        margin: 30px auto;
    }
    
    .logo-expansion {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .join-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .hero-logo {
        font-size: 2.8rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .logo-expansion {
        font-size: 2rem;
    }
    
    .logo-separator {
        font-size: 2rem;
        margin: 5px 0;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 70px 0;
    }
    
    .stats-container {
        justify-content: center;
    }
    
    .stat-card {
        min-width: 150px;
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 2.8rem;
    }
    
    .progress-container {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 900px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        font-size: 2rem;
    }
    
    .logo-expansion {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
    
    .logo-separator {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-card {
        min-width: 100%;
    }
    
    .step {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .map-legend {
        position: relative;
        top: 0;
        left: 0;
        max-width: 100%;
    }
}

/* Стили для карты */
.leaflet-container {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-dark) !important;
}

.university-marker {
    background-color: var(--primary-light);
    border: 3px solid var(--text-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-weight: bold;
    box-shadow: 0 0 10px rgba(193, 191, 188, 0.5);
}

.leaflet-popup-content {
    min-width: 280px;
    padding: 0;
    margin: 0;
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.university-popup {
    padding: 0;
}

.university-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px 4px 0 0;
    background-color: var(--primary-gray);
}

.university-info {
    padding: 20px;
}

.university-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.university-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.university-comment {
    color: var(--text-secondary);
    line-height: 1.6;
    font-style: italic;
    border-left: 3px solid var(--primary-light);
    padding-left: 12px;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-tip {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

.leaflet-control-attribution {
    background-color: rgba(23, 23, 23, 0.8) !important;
    color: var(--text-secondary) !important;
}

.leaflet-control-attribution a {
    color: var(--primary-light) !important;
}

@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

@keyframes glitchText {
  0% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }
  5% {
    clip-path: inset(15% 0 30% 0);
    transform: translate(-1px, 1px);
  }
  10% {
    clip-path: inset(30% 0 15% 0);
    transform: translate(1px, -1px);
  }
  15% {
    clip-path: inset(10% 0 40% 0);
    transform: translate(-1px, 0);
  }
  20% {
    clip-path: inset(0 0 0 0);
    transform: translate(0);
  }
}

.glitch-text {
  position: relative;
  animation: glitchText 10s infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch-text::before {
  animation: glitch 0.3s infinite;
  color: rgba(255, 0, 0, 0.7);
  z-index: -1;
}

.glitch-text::after {
  animation: glitch 0.3s infinite reverse;
  color: rgba(0, 255, 255, 0.7);
  z-index: -2;
}

.spb-progress, .msk-progress {
    background: linear-gradient(90deg, #C1BFBC, #E0DEDB);
}

.hide {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: rgba(23, 23, 23, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 155px;
    z-index: 2000;
    max-width: 400px;
    max-height: 200px;
}
