/* ===== MAIN LAYOUT ===== */

.app-container {
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background Canvas для частиц */
.background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Экран-контейнер */
.screen-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Базовый стиль экрана */
.screen {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* ===== COMMON ELEMENTS ===== */

/* Кнопка закрытия */
.close-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    color: var(--neon-cyan);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    transition: all var(--transition-normal);
    z-index: 10;
}

.close-button:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 15px currentColor;
}

/* Кнопка возврата */
.back-button {
    background: none;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all var(--transition-normal);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.back-button:hover {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    box-shadow: 0 0 20px var(--neon-pink);
}

/* ===== SECTIONS ===== */

.section {
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Info text */
.info-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 20px 0 10px 0;
}

/* ===== GRID LAYOUTS ===== */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ===== FLEX LAYOUTS ===== */

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.gap-30 {
    gap: 30px;
}

/* ===== SIZING ===== */

.full-width {
    width: 100%;
}

.full-height {
    height: 100%;
}

/* ===== VISIBILITY ===== */

.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}

/* ===== TEXT UTILITIES ===== */

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

.text-uppercase {
    text-transform: uppercase;
}

.text-bold {
    font-weight: 700;
}

.text-small {
    font-size: 0.85rem;
}

.text-large {
    font-size: 1.3rem;
}

.text-secondary {
    color: var(--text-secondary);
}

/* ===== SPACING UTILITIES ===== */

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1400px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .neon-frame-large {
        padding: 40px 25px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .screen {
        padding: 20px;
    }
}

/* ===== SHADOW UTILITIES ===== */

.shadow-glow-sm {
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.3);
}

.shadow-glow-md {
    box-shadow: 0 0 40px rgba(255, 0, 110, 0.4);
}

.shadow-glow-lg {
    box-shadow: 0 0 60px rgba(255, 0, 110, 0.5);
}

/* ===== BORDER UTILITIES ===== */

.border-neon-pink {
    border: 2px solid var(--neon-pink);
    box-shadow: inset 0 0 20px rgba(255, 0, 110, 0.2);
}

.border-neon-cyan {
    border: 2px solid var(--neon-cyan);
    box-shadow: inset 0 0 20px rgba(0, 212, 255, 0.2);
}

.border-neon-gold {
    border: 2px solid var(--neon-gold);
    box-shadow: inset 0 0 20px rgba(255, 215, 0, 0.2);
}

/* ===== BADGE ===== */

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 0, 110, 0.2);
    border: 1px solid var(--neon-pink);
    border-radius: 20px;
    color: var(--neon-pink);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
}

/* ===== SKELETON LOADING ===== */

.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 0, 110, 0.1) 0%, 
        rgba(255, 0, 110, 0.2) 50%, 
        rgba(255, 0, 110, 0.1) 100%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

/* ===== SCROLLABLE CONTAINER ===== */

.scrollable {
    overflow-y: auto;
    overflow-x: hidden;
}

.scrollable::-webkit-scrollbar {
    width: 6px;
}

.scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.scrollable::-webkit-scrollbar-thumb {
    background: var(--neon-pink);
    border-radius: 3px;
    box-shadow: 0 0 10px var(--neon-pink);
}

/* ===== TOOLTIP ===== */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    background-color: var(--neon-pink);
    color: var(--text-primary);
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.8rem;
    box-shadow: 0 0 15px var(--neon-pink);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--neon-pink) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ===== Z-INDEX CONTROL ===== */

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-100 { z-index: 100; }

/* ===== OVERFLOW ===== */

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.text-overflow {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
