/* Reset и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0e0e10;
    color: #efeff1;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Анимация фона */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0e0e10 0%, #18181b 50%, #0e0e10 100%);
    z-index: -1;
    overflow: hidden;
}

/* Minecraft пиксельные блоки */
.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Плавающие блоки */
        radial-gradient(4px 4px at 50px 100px, rgba(145, 70, 255, 0.8), transparent),
        radial-gradient(3px 3px at 150px 200px, rgba(145, 70, 255, 0.6), transparent),
        radial-gradient(2px 2px at 250px 50px, rgba(145, 70, 255, 0.7), transparent),
        radial-gradient(4px 4px at 350px 150px, rgba(145, 70, 255, 0.5), transparent),
        radial-gradient(3px 3px at 450px 80px, rgba(145, 70, 255, 0.8), transparent),
        radial-gradient(2px 2px at 550px 180px, rgba(145, 70, 255, 0.6), transparent),
        radial-gradient(4px 4px at 650px 120px, rgba(145, 70, 255, 0.7), transparent),
        radial-gradient(3px 3px at 750px 220px, rgba(145, 70, 255, 0.5), transparent),
        radial-gradient(2px 2px at 850px 90px, rgba(145, 70, 255, 0.8), transparent),
        radial-gradient(4px 4px at 950px 160px, rgba(145, 70, 255, 0.6), transparent),
        /* Дополнительные блоки */
        radial-gradient(3px 3px at 100px 300px, rgba(145, 70, 255, 0.7), transparent),
        radial-gradient(2px 2px at 200px 350px, rgba(145, 70, 255, 0.5), transparent),
        radial-gradient(4px 4px at 300px 280px, rgba(145, 70, 255, 0.8), transparent),
        radial-gradient(3px 3px at 400px 320px, rgba(145, 70, 255, 0.6), transparent),
        radial-gradient(2px 2px at 500px 380px, rgba(145, 70, 255, 0.7), transparent);
    background-repeat: repeat;
    background-size: 1000px 400px;
    animation: minecraftFloat 25s linear infinite;
}

/* Пиксельная сетка */
.background-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        /* Горизонтальные линии */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 25px,
            rgba(145, 70, 255, 0.05) 25px,
            rgba(145, 70, 255, 0.05) 26px
        ),
        /* Вертикальные линии */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 25px,
            rgba(145, 70, 255, 0.05) 25px,
            rgba(145, 70, 255, 0.05) 26px
        ),
        /* Диагональные линии */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 50px,
            rgba(145, 70, 255, 0.02) 50px,
            rgba(145, 70, 255, 0.02) 51px
        );
    animation: gridMove 20s linear infinite;
}

@keyframes minecraftFloat {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-1000px) translateY(-400px); }
}

@keyframes gridMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(25px) translateY(25px); }
}

/* Header */
.header {
    background: rgba(18, 18, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(145, 70, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(145, 70, 255, 0.5));
}

.logo-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #9146ff, #a970ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 0.9rem;
    color: #adadb8;
}

/* Main */
.main {
    padding: 3rem 0;
    min-height: calc(100vh - 200px);
}

.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #9146ff, #a970ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(145, 70, 255, 0.3);
    letter-spacing: 2px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #adadb8;
    max-width: 600px;
    margin: 0 auto;
}

/* Сетка серверов */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.server-card {
    background: rgba(18, 18, 23, 0.8);
    border: 2px solid rgba(145, 70, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(145, 70, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.server-card:hover::before {
    left: 100%;
}

.server-card:hover {
    border-color: #9146ff;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(145, 70, 255, 0.2);
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.server-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.server-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #efeff1;
    margin-bottom: 0.5rem;
}

.server-ip {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: #9146ff;
    margin-bottom: 1rem;
}

.server-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #adadb8;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-weight: 600;
    color: #efeff1;
}

.stat-value.online {
    color: #00ff88;
}

.server-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Кнопки */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(45deg, #9146ff, #a970ff);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #a970ff, #9146ff);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(145, 70, 255, 0.3);
}

.btn-secondary {
    background: rgba(145, 70, 255, 0.1);
    color: #9146ff;
    border: 1px solid rgba(145, 70, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(145, 70, 255, 0.2);
    border-color: #9146ff;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(18, 18, 23, 0.95);
    border: 2px solid rgba(145, 70, 255, 0.3);
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    position: relative;
    z-index: 1;
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(85vh - 80px);
}

/* Кастомный скроллбар для модального окна */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(145, 70, 255, 0.1);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #9146ff, #a970ff);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #a970ff, #9146ff);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(145, 70, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #efeff1;
}

.modal-close {
    background: none;
    border: none;
    color: #adadb8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #efeff1;
    background: rgba(145, 70, 255, 0.1);
}

.modal-body {
    padding: 1.5rem;
}

/* Детали сервера в модальном окне */
.server-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.server-icon-large {
    font-size: 4rem;
    flex-shrink: 0;
}

.server-icon-small {
    font-size: 2rem;
    flex-shrink: 0;
}

.server-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #efeff1;
}

.server-ip {
    font-family: 'VT323', monospace;
    color: #9146ff;
    margin-bottom: 1rem;
}

.server-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.server-description {
    color: #adadb8;
    line-height: 1.6;
}

.server-description h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: #9146ff;
    margin: 1.5rem 0 1rem 0;
    letter-spacing: 1px;
}

.server-description h3:first-child {
    margin-top: 0;
}

.server-description p {
    margin-bottom: 1rem;
    text-align: justify;
}

.server-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.server-description li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #adadb8;
}

.server-description li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #9146ff;
    font-size: 0.8rem;
}

/* Информация о подключении */
.connection-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Прогресс бар */
.progress-container {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(145, 70, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #9146ff, #a970ff);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    color: #adadb8;
    font-size: 0.9rem;
}

/* Форма авторизации */
.auth-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(145, 70, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(145, 70, 255, 0.2);
}

.auth-notice {
    font-size: 0.9rem;
    color: #9146ff;
    margin-top: 0.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #efeff1;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: 8px;
    background: rgba(18, 18, 23, 0.8);
    color: #efeff1;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #9146ff;
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.1);
}

.form-group input::placeholder {
    color: #adadb8;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Регистрация */
.register-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(145, 70, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(145, 70, 255, 0.2);
}

.register-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.register-notice {
    font-size: 0.9rem;
    color: #9146ff;
    margin-top: 0.5rem;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Ошибка */
.error-content {
    text-align: center;
    margin-bottom: 2rem;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ff6b6b;
}

.error-content p {
    color: #adadb8;
    margin-bottom: 1.5rem;
}

.error-suggestions {
    text-align: left;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.error-suggestions h5 {
    color: #ff6b6b;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.error-suggestions ul {
    list-style: none;
    padding: 0;
}

.error-suggestions li {
    color: #adadb8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.error-suggestions li::before {
    content: '•';
    color: #ff6b6b;
    position: absolute;
    left: 0;
}

/* Успех */
.success-content {
    text-align: center;
    margin-bottom: 2rem;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: successBounce 0.6s ease-in-out;
}

.success-content h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #00ff88;
}

.success-content p {
    color: #adadb8;
    margin-bottom: 1.5rem;
}

.success-details {
    text-align: left;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    padding: 1rem;
}

.success-details h5 {
    color: #00ff88;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.success-details ul {
    list-style: none;
    padding: 0;
}

.success-details li {
    color: #adadb8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.success-details li::before {
    content: '✓';
    color: #00ff88;
    position: absolute;
    left: 0;
}

@keyframes successBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Footer */
.footer {
    background: rgba(18, 18, 23, 0.95);
    border-top: 1px solid rgba(145, 70, 255, 0.2);
    padding: 2rem 0;
    text-align: center;
    color: #adadb8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .logo-text {
        font-size: 1.2rem;
    }
    
    .servers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .server-details {
        flex-direction: column;
        text-align: center;
    }
    
    .server-icon-large {
        font-size: 3rem;
    }
    
    .form-actions,
    .modal-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Пиксельные эффекты */
.server-card,
.modal-content,
.btn {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Внутренняя анимация карточек */
.server-card {
    position: relative;
    overflow: hidden;
}

.server-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(145, 70, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: cardShine 3s ease-in-out infinite;
    pointer-events: none;
}

.server-icon {
    position: relative;
    display: inline-block;
}

.server-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(145, 70, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    animation: iconGlow 3s ease-in-out infinite;
    border-radius: 50%;
}

@keyframes cardShine {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes iconGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
} 
