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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.6;
}

/* Базовые стили для страниц */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.page.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Контейнер загрузки */
.loading-container {
    text-align: center;
    max-width: 600px;
    width: 90%;
    padding: 0 20px;
}

/* Логотип и текст */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.logo svg {
    filter: drop-shadow(0 0 10px #97a7ff);
    width: 50px;
    height: 30px;
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 10px #97a7ff);
    }
    100% {
        filter: drop-shadow(0 0 20px #97a7ff) drop-shadow(0 0 30px #97a7ff);
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-weight: 600;
    line-height: 1.2;
}

.meta-text {
    font-size: 24px;
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.network-text {
    font-size: 16px;
    color: #97a7ff;
    text-shadow: 0 0 10px rgba(151, 167, 255, 0.5);
    margin-top: -2px;
    font-weight: 400;
}

.lite-text {
    font-size: 14px;
    color: #97a7ff;
    text-shadow: 0 0 10px rgba(151, 167, 255, 0.5);
    margin-top: -2px;
    font-weight: 300;
}

/* Анимация печати */
.typing-text {
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 30px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.text-content {
    margin-right: 5px;
}

.cursor {
    animation: blink 1s infinite;
    color: #97a7ff;
    font-weight: 300;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Анимированные точки загрузки */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #97a7ff;
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out both;
    box-shadow: 0 0 10px #97a7ff;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Индикатор успеха */
.success-indicator {
    margin-top: 20px;
    animation: successPulse 1s ease-in-out infinite alternate;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 5px #00ff88);
    }
    100% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px #00ff88) drop-shadow(0 0 25px #00ff88);
    }
}

/* Финальная страница */
.main-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 100;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 100px 20px 20px;
}

.hero-section {
    text-align: center;
    max-width: 800px;
    z-index: 50;
    position: relative;
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.title-part {
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.title-highlight {
    color: #97a7ff;
    text-shadow: 0 0 30px #97a7ff;
    display: block;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 0 30px #97a7ff;
    }
    100% {
        text-shadow: 0 0 50px #97a7ff, 0 0 70px #97a7ff;
    }
}

.description {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #b0b0b0;
    margin-bottom: 50px;
    line-height: 1.7;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Discord секция */
.discord-section {
    margin-top: 40px;
}

.discord-text {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.discord-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.3);
}

.discord-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.discord-button:hover::before {
    left: 100%;
}

.discord-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 40px rgba(88, 101, 242, 0.4);
    filter: brightness(1.1);
}

.discord-button:active {
    transform: translateY(0) scale(1.02);
}

/* Киберпанк глитч эффект для кнопки */
.discord-button:hover {
    animation: glitch 0.3s ease-in-out;
}

@keyframes glitch {
    0% { transform: translateY(-2px) scale(1.05); }
    20% { transform: translateY(-2px) scale(1.05) skew(2deg); }
    40% { transform: translateY(-2px) scale(1.05) skew(-2deg); }
    60% { transform: translateY(-2px) scale(1.05) skew(1deg); }
    80% { transform: translateY(-2px) scale(1.05) skew(-1deg); }
    100% { transform: translateY(-2px) scale(1.05); }
}

/* Фоновое видео */
.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%2397a7ff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 10px); }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(10, 10, 10, 0.8) 100%);
}

/* 404 страница */
.error-container {
    text-align: center;
    max-width: 600px;
    width: 90%;
    padding: 0 20px;
}

.error-content {
    margin-top: 40px;
}

.error-code {
    font-size: clamp(4rem, 15vw, 8rem);
    font-weight: 900;
    color: #97a7ff;
    text-shadow: 0 0 50px #97a7ff;
    margin-bottom: 20px;
    animation: errorGlow 2s ease-in-out infinite alternate;
}

@keyframes errorGlow {
    0% {
        text-shadow: 0 0 50px #97a7ff;
    }
    100% {
        text-shadow: 0 0 80px #97a7ff, 0 0 100px #97a7ff;
    }
}

.error-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 600;
}

.error-description {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin-bottom: 40px;
    line-height: 1.6;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #97a7ff 0%, #7c8cfc 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(151, 167, 255, 0.3);
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(151, 167, 255, 0.4);
    filter: brightness(1.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .logo-container {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .logo-text {
        align-items: center;
        text-align: center;
    }
    
    .meta-text {
        font-size: 20px;
    }
    
    .network-text {
        font-size: 14px;
    }
    
    .lite-text {
        font-size: 12px;
    }
    
    .typing-text {
        font-size: 16px;
        min-height: 50px;
    }
    
    .main-title {
        margin-bottom: 20px;
    }
    
    .description {
        margin-bottom: 30px;
    }
    
    .discord-section {
        margin-top: 30px;
    }
    
    .discord-text {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .discord-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .header {
        padding: 15px;
    }
    
    .main-content {
        padding: 80px 15px 15px;
    }
    
    .loading-container {
        padding: 0 15px;
    }
    
    .error-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .logo svg {
        width: 32px;
        height: 32px;
    }
    
    .meta-text {
        font-size: 18px;
    }
    
    .network-text {
        font-size: 12px;
    }
    
    .lite-text {
        font-size: 10px;
    }
    
    .typing-text {
        font-size: 14px;
        min-height: 40px;
    }
    
    .discord-button {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 8px;
    }
    
    .discord-button svg {
        width: 20px;
        height: 20px;
    }
    
    .dot {
        width: 6px;
        height: 6px;
    }
    
    .loading-dots {
        gap: 6px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .loading-container {
        max-width: 500px;
    }
    
    .logo-container {
        margin-bottom: 20px;
    }
    
    .typing-text {
        margin-bottom: 20px;
        min-height: 30px;
        font-size: 14px;
    }
    
    .main-content {
        padding: 60px 20px 20px;
    }
    
    .main-title {
        margin-bottom: 15px;
    }
    
    .description {
        margin-bottom: 20px;
    }
    
    .discord-section {
        margin-top: 20px;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 120px 40px 40px;
    }
    
    .loading-container {
        max-width: 700px;
    }
    
    .hero-section {
        max-width: 900px;
    }
}

/* Большие экраны */
@media (min-width: 1400px) {
    .main-content {
        padding: 140px 60px 60px;
    }
    
    .loading-container {
        max-width: 800px;
    }
    
    .hero-section {
        max-width: 1000px;
    }
    
    .typing-text {
        font-size: 20px;
    }
    
    .discord-button {
        padding: 18px 36px;
        font-size: 1.2rem;
    }
}

/* Анимации появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page.active .loading-container,
.page.active .main-container,
.page.active .error-container {
    animation: fadeInUp 0.8s ease-out;
}

/* Улучшенная производительность */
.page,
.logo,
.discord-button,
.dot {
    will-change: transform, opacity;
}

/* Сглаживание шрифтов */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Скрытие скроллбаров */
::-webkit-scrollbar {
    display: none;
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Декоративные элементы для страницы 5 */
.top-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(180deg, rgba(151, 167, 255, 0.1) 0%, transparent 100%);
    z-index: 1;
}

/* Боковые логотипы */
.side-logos {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.side-logo {
    position: absolute;
    top: 0;
    opacity: 0.3;
    animation: sidePulse 4s ease-in-out infinite;
}

.side-logo.left {
    left: 30px;
}

.side-logo.right {
    right: 30px;
}

@keyframes sidePulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

/* Статус индикатор */
.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #97a7ff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #97a7ff;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px #97a7ff;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Логотип снизу с подписью */
.bottom-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
    animation: logoAppear 2s ease-out;
}

.logo-red {
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo-red:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 20px #ff4757);
}

.logo-signature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.signature-text {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.signature-brand {
    font-size: 1.1rem;
    color: #ff4757;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Нижние декоративные элементы */
.bottom-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(0deg, rgba(151, 167, 255, 0.1) 0%, transparent 100%);
    z-index: 1;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .side-logo.left {
        left: 15px;
    }
    
    .side-logo.right {
        right: 15px;
    }
    
    .features-grid {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .top-decoration,
    .bottom-decoration {
        height: 60px;
    }
}