:root { --bg: #050510; --card: #151525; --neon-blue: #00f3ff; --neon-pink: #bc13fe; --text: #ffffff; }
body { margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; user-select: none; }
.app-layout { display: flex; flex-direction: column; height: 100%; width: 100%; }
.neon-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at 50% -20%, #1a1a40, #050510); z-index: -2; }
.scanlines { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(255,255,255,0.03) 50%, transparent 50%); background-size: 100% 4px; pointer-events: none; z-index: -1; }

.fixed-top-area { flex-shrink: 0; background: rgba(21, 21, 37, 0.98); border-bottom: 1px solid var(--neon-blue); box-shadow: 0 5px 20px rgba(0,0,0,0.5); z-index: 1000; }
.inline-player { display: flex; padding: 10px 15px; background: rgba(255,255,255,0.02); gap: 15px; }
.player-info-col { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.logo-small { font-weight: 800; font-size: 16px; letter-spacing: 1px; }
.neon-text { color: var(--neon-pink); text-shadow: 0 0 10px var(--neon-pink); }
.vol-mini-container { display: flex; align-items: center; gap: 5px; width: 50%; }
.tiny-icon { font-size: 12px; color: #888; }
#vol-slider { width: 100%; height: 4px; accent-color: var(--neon-blue); cursor: pointer; }
.bot-row { background: rgba(0,0,0,0.3); padding: 5px; border-radius: 4px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,0.1); }
.marquee-container { width: 100%; overflow: hidden; white-space: nowrap; }
.marquee-content { display: inline-block; padding-left: 100%; animation: marquee 10s linear infinite; font-size: 13px; font-weight: bold; color: var(--neon-blue); }
.marquee-content span { color: white; }
#artist-name { color: var(--neon-pink); }
@keyframes marquee { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }

.player-btn-col { display: flex; align-items: center; justify-content: center; }
.big-play-btn { width: 55px; height: 55px; border-radius: 50%; border: none; background: var(--neon-blue); position: relative; overflow: hidden; box-shadow: 0 0 15px var(--neon-blue); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.big-play-btn:active { transform: scale(0.95); }
#mini-art { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); }
.icon-overlay { position: relative; z-index: 2; font-size: 20px; color: white; text-shadow: 0 0 5px black; }
.inline-player.playing #mini-art { animation: spin 5s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.tabs { display: flex; border-top: 1px solid rgba(255,255,255,0.1); }
.tab-btn { flex: 1; background: none; border: none; color: #888; font-size: 12px; font-weight: 600; text-transform: uppercase; padding: 12px 0; cursor: pointer; border-bottom: 3px solid transparent; }
.tab-btn.active { color: var(--neon-blue); border-bottom: 3px solid var(--neon-blue); background: rgba(255,255,255,0.03); }

.main-content { flex: 1; position: relative; overflow: hidden; background: #000; }
.tab-pane { display: none !important; width: 100%; height: 100%; overflow-y: auto; }
.tab-pane.active { display: block !important; }
#home.full-height.active, #menu.full-height.active { overflow: hidden; display: flex !important; padding: 0; }
#game-frame { width: 100%; height: 100%; border: none; display: block; background: #000; }
.scrollable-pad { padding: 15px; box-sizing: border-box; overflow-y: auto; background: var(--bg); }

/* КАТАЛОГ СТИЛИ */
.catalog-grid { display: flex; flex-direction: column; gap: 10px; }
.game-card { display: flex; align-items: center; background: var(--card); padding: 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); cursor: pointer; transition: 0.2s; }
.game-card:active { transform: scale(0.98); background: rgba(255,255,255,0.1); }
.game-card-icon { width: 45px; height: 45px; background: rgba(0,0,0,0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--neon-blue); margin-right: 12px; }
.game-card-info { flex: 1; }
.game-card-title { display: block; font-weight: bold; font-size: 15px; color: white; }
.game-card-desc { font-size: 11px; color: #777; }
.play-mini { font-size: 12px; color: var(--neon-blue); opacity: 0.5; }

.history-item { display: flex; align-items: center; background: var(--card); margin-bottom: 8px; padding: 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.05); }
.hist-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; margin-right: 15px; }
.hist-info { flex: 1; overflow: hidden; }
.hist-title { font-size: 14px; font-weight: bold; color: white; display: block; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-artist { font-size: 12px; color: var(--neon-blue); }
.sku-btn { background: transparent; border: 1px solid var(--neon-blue); color: var(--neon-blue); width: 35px; height: 35px; border-radius: 50%; cursor: pointer; margin-left: 10px; }
.loading-msg { text-align: center; color: #666; margin-top: 20px; }
.placeholder-box { text-align: center; padding: 40px 20px; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.modal.hidden { display: none; }
.modal-content { background: #151525; border: 1px solid var(--neon-blue); padding: 30px; border-radius: 20px; text-align: center; width: 80%; max-width: 300px; position: relative; }
.close-modal { position: absolute; top: 10px; right: 15px; background: none; border: none; color: #666; font-size: 24px; cursor: pointer; }
#modal-art { width: 100%; aspect-ratio: 1/1; border-radius: 15px; object-fit: cover; margin-bottom: 15px; }
.action-btn { display: block; padding: 12px; border-radius: 10px; background: #0088cc; color: white; text-decoration: none; font-weight: bold; border: 1px solid #444; }

/* СТИЛИ ДЛЯ ПОД-ВКЛАДОК (SUB-TABS) */
.sub-nav-bar {
    display: flex;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    overflow-x: auto;
}
.sub-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #aaa;
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.sub-tab-btn.active {
    color: var(--neon-blue);
    border-bottom: 2px solid var(--neon-blue);
    background: rgba(0, 243, 255, 0.05);
}
.sub-content-area {
    flex: 1;
    overflow-y: auto;
    position: relative;
    height: calc(100% - 40px); /* Вычет высоты меню */
}
.sub-pane {
    display: none;
    height: 100%;
}
.sub-pane.active {
    display: block;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
/* СТИЛИ ДЛЯ AI СТУДИИ */
.studio-container { padding: 15px; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }

/* Кнопки режимов */
.mode-switcher { display: flex; gap: 5px; margin-bottom: 15px; background: rgba(255,255,255,0.05); padding: 5px; border-radius: 8px; }
.mode-btn { flex: 1; background: transparent; border: 1px solid transparent; color: #888; padding: 8px 0; cursor: pointer; border-radius: 6px; font-size: 12px; transition: 0.2s; }
.mode-btn.active { background: var(--neon-blue); color: #000; font-weight: bold; box-shadow: 0 0 10px var(--neon-blue); }

/* Поле ввода */
.neon-input { width: 100%; height: 80px; background: #000; border: 1px solid #333; color: var(--neon-blue); padding: 10px; border-radius: 8px; font-family: monospace; resize: none; margin-bottom: 10px; box-sizing: border-box; }
.neon-input:focus { outline: none; border-color: var(--neon-blue); box-shadow: 0 0 5px var(--neon-blue); }

/* Кнопка генерации */
.action-btn.full-width { width: 100%; text-align: center; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; cursor: pointer; }
.action-btn:disabled { background: #333; color: #555; border-color: #555; cursor: not-allowed; }

/* Результат */
.status-line { text-align: center; font-size: 11px; color: #666; margin-bottom: 5px; min-height: 15px; }
.result-area { flex: 1; border: 1px dashed #333; border-radius: 8px; overflow: hidden; position: relative; background: #000; min-height: 200px; }
.result-area.hidden { display: none; }
#generated-frame { width: 100%; height: 100%; }
.text-scrollable { padding: 10px; color: #ddd; font-family: monospace; font-size: 12px; white-space: pre-wrap; overflow-y: auto; height: 100%; }
.text-scrollable.hidden { display: none; }
/* КАРТОЧКА ГЕНЕРАЦИИ */
.generated-card {
    display: flex;
    align-items: center;
    background: #1a1a2e;
    border: 1px solid var(--neon-blue);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 200px;
    transition: 0.2s;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.1);
}
.generated-card:hover {
    background: #2a2a4e;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}
.card-icon {
    font-size: 24px;
    color: var(--neon-blue);
    margin-right: 10px;
}
.card-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#gen-filename {
    font-weight: bold;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tap-hint {
    font-size: 10px;
    color: #888;
}
.open-icon {
    font-size: 12px;
    color: #666;
}
