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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ЗАГРУЗОЧНЫЙ ЭКРАН */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #000, #1a0033, #330066, #000);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.loading-content {
    text-align: center;
}

.hologram-loader {
    width: 120px;
    height: 120px;
    border: 3px solid transparent;
    border-radius: 50%;
    border-top: 3px solid #00ffff;
    border-right: 3px solid #ff00ff;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
    margin: 0 auto 2rem;
    box-shadow: 0 0 30px #00ffff, inset 0 0 30px #ff00ff;
    position: relative;
}

.hologram-loader::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid transparent;
    border-radius: 50%;
    border-left: 2px solid #ffff00;
    animation: spin 2s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 30px #00ffff, inset 0 0 30px #ff00ff; }
    50% { box-shadow: 0 0 50px #00ffff, inset 0 0 50px #ff00ff; }
}

.loading-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    color: #00ffff;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px #00ffff;
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    from { text-shadow: 0 0 15px #00ffff; }
    to { text-shadow: 0 0 25px #00ffff, 0 0 35px #00ffff; }
}

.loading-progress {
    width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid #333;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00);
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressGlow 2s linear infinite;
}

@keyframes progressGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* СЕЛЕКТОР ВСЕЛЕННЫХ */
.universe-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1a0033 0%, #000 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.multiverse-title {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 30px #ff00ff;
    margin-bottom: 1rem;
    animation: titlePulse 3s ease-in-out infinite;
    position: relative;
}

.multiverse-title::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
    background-size: 400% 400%;
    animation: gradientShift 3s ease infinite;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.3;
}

.multiverse-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0.8;
}

@keyframes titlePulse {
    0%, 100% { transform: scale(1); text-shadow: 0 0 30px #ff00ff; }
    50% { transform: scale(1.05); text-shadow: 0 0 40px #ff00ff, 0 0 60px #ff00ff; }
}

.universe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
}

.universe-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #333;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.universe-card:hover {
    border-color: #00ffff;
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 255, 255, 0.4);
}

.universe-card:hover .card-glow {
    opacity: 1;
}

.universe-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.universe-card h3 {
    font-family: 'Orbitron', monospace;
    color: #00ffff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.universe-card p {
    color: #ccc;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

.card-stats span {
    background: rgba(0, 255, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

/* ОБЩИЕ СТИЛИ ВСЕЛЕННЫХ */
.universe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 500;
}

.universe.active {
    display: block;
}

.universe-exit {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(45deg, #ff0040, #ff4070);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.5);
    z-index: 1000;
}

.universe-exit:hover {
    background: linear-gradient(45deg, #ff4070, #ff0040);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.8);
}

/* ТЕРМИНАЛ ХАКЕРА */
.terminal-universe {
    background: linear-gradient(45deg, #001100, #003300, #001100);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    padding: 2rem;
}

.terminal-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #00ff00;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0, 255, 0, 0.5);
    height: 75vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.terminal-header {
    background: linear-gradient(90deg, #00ff00, #00cc00);
    color: #000;
    padding: 1rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    position: relative;
    border-radius: 12px 12px 0 0;
}

.terminal-content {
    flex: 1;
    padding: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.95);
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 0.8rem;
    color: #00ff00;
}

.prompt {
    color: #00ff00;
    margin-right: 0.5rem;
    text-shadow: 0 0 5px #00ff00;
}

.cursor {
    animation: blink 1s infinite;
    background: #00ff00;
    color: #000;
    padding: 0 2px;
}

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

.terminal-input-container {
    display: flex;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 0 0 12px 12px;
    padding: 1rem;
    gap: 1rem;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: 2px solid #333;
    color: #00ff00;
    font-family: 'JetBrains Mono', monospace;
    padding: 1rem;
    outline: none;
    font-size: 1rem;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.terminal-input:focus {
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.terminal-send-btn {
    background: linear-gradient(45deg, #00ff00, #00cc00);
    border: none;
    color: #000;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.terminal-send-btn:hover {
    background: linear-gradient(45deg, #00cc00, #00ff00);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
}

.terminal-send-btn:active {
    transform: translateY(0);
}

.terminal-help {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 10px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

/* ЧАСТИЦЫ */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* МОДАЛЬНОЕ ОКНО */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    margin: 3% auto;
    padding: 3rem;
    border: 3px solid #00ffff;
    border-radius: 20px;
    width: 85%;
    max-width: 700px;
    box-shadow: 0 0 50px rgba(0, 255, 255, 0.5);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #ff0040;
    float: right;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 2rem;
    transition: all 0.3s ease;
}

.close:hover {
    color: #ff4070;
    transform: scale(1.2) rotate(90deg);
}