/* Dirtbag OS // Rogue Panel Theme: Cyberpunk CRT Indigo / Cyan */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-void: #0a0714;
    --bg-panel: #130c24;
    --bg-panel-alt: #1c1136;
    --bg-input: #0d0820;
    --purple-800: #291447;
    --purple-700: #4c2a7a;
    --purple-500: #7b2cbf;
    --purple-400: #9d4edd;
    --purple-300: #c77dff;
    --purple-200: #e0aaff;
    --holo-cyan: #00e5ff;
    --cyan-dim: #0099aa;
    --text-dim: #9d7ab8;
    --text-bright: #f0e6ff;
    --danger: #ff3366;
    --danger-glow: rgba(255, 51, 102, 0.6);
    --warning: #ffaa00;
    --success: #00ffaa;
    --success-glow: rgba(0, 255, 170, 0.6);
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    font-family: 'Courier New', Courier, monospace;
    background: var(--bg-void);
    color: var(--purple-200);
    overflow: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* CRT & Atmosphere layers */
.grid-overlay {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        linear-gradient(rgba(157, 78, 221, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(157, 78, 221, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridScroll 25s linear infinite;
}
@keyframes gridScroll { to { transform: translate(50px, 50px); } }

.scanlines {
    position: fixed; inset: 0; z-index: 10; pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.26) 2px, rgba(0,0,0,.26) 4px);
}

.crt-glow {
    position: fixed; inset: 0; z-index: 10; pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(157,78,221,.07) 0%, rgba(0,229,255,.03) 50%, rgba(0,0,0,.6) 100%);
    box-shadow: inset 0 0 100px rgba(0,0,0,0.85);
}

.particles { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.particle {
    position: absolute; width: 2px; height: 2px; border-radius: 50%;
    background: var(--purple-300); box-shadow: 0 0 6px var(--purple-400);
    opacity: 0; animation: floatParticle linear infinite;
}
.particle.cyan { background: var(--holo-cyan); box-shadow: 0 0 8px var(--holo-cyan); }
@keyframes floatParticle {
    0% { opacity: 0; transform: translateY(100vh) scale(0); }
    10%, 90% { opacity: 0.8; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* Panel Frame Layout */
.panel-layout {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    height: 100dvh;
    background: rgba(14, 8, 28, 0.9);
}

/* Top Navigation Bar */
.panel-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--purple-700);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    flex-wrap: wrap;
    gap: 12px;
}

.user-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rogue-avatar {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    border: 1px solid var(--holo-cyan);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.identity-text h2 {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--holo-cyan);
    letter-spacing: 0.08em;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
    margin: 0;
}

.identity-text .user-meta {
    font-size: 0.75rem;
    color: var(--purple-300);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.clock-badge {
    padding: 4px 10px;
    background: var(--bg-input);
    border: 1px solid var(--purple-700);
    border-radius: 3px;
    color: var(--holo-cyan);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

/* Tool Navigation Dock */
.panel-dock {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: var(--bg-panel-alt);
    border-bottom: 1px solid var(--purple-700);
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dock-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.dock-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    color: var(--purple-200);
    text-decoration: none;
    font-size: 0.82rem;
    border: 1px solid var(--purple-700);
    background: rgba(13, 8, 32, 0.6);
    border-radius: 3px;
    transition: all 0.2s;
    white-space: nowrap;
}

.dock-item:hover {
    color: var(--holo-cyan);
    border-color: var(--holo-cyan);
    background: rgba(0, 229, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.dock-item.active {
    color: var(--holo-cyan);
    border-color: var(--holo-cyan);
    background: rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
    font-weight: bold;
}

.dock-item.android-btn {
    border-color: var(--purple-400);
    color: var(--purple-200);
}
.dock-item.android-btn:hover {
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 0 12px var(--success-glow);
}

/* Main Content Pane (Iframe Host) */
.main-pane {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    padding: 10px 16px 14px;
}

.pane-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--bg-panel);
    border: 1px solid var(--purple-700);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    font-size: 0.8rem;
    gap: 10px;
}

.pane-title {
    color: var(--holo-cyan);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pane-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pane-btn {
    background: none;
    border: 1px solid var(--purple-700);
    color: var(--purple-300);
    padding: 3px 8px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}
.pane-btn:hover {
    border-color: var(--holo-cyan);
    color: var(--holo-cyan);
    box-shadow: 0 0 8px rgba(0,229,255,0.3);
}

.iframe-container {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    position: relative;
    border: 1px solid var(--purple-700);
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    background: var(--bg-void);
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Buttons */
a.btn, button.btn {
    display: inline-block; cursor: pointer; text-decoration: none; font: inherit;
    color: var(--holo-cyan); background: transparent; border: 1px solid var(--holo-cyan);
    padding: 6px 14px; border-radius: 3px; transition: .2s;
}
a.btn:hover, button.btn:hover { background: var(--holo-cyan); color: var(--bg-void); box-shadow: 0 0 12px var(--holo-cyan); }
a.btn.danger, button.btn.danger { color: var(--danger); border-color: var(--danger); }
a.btn.danger:hover, button.btn.danger:hover { background: var(--danger); color: var(--bg-void); box-shadow: 0 0 12px var(--danger); }

/* Lambda Prompt at top of Rogue's Panel */
.panel-lambda-bar {
    flex-shrink: 0;
    background: #0c071a;
    border-bottom: 1px solid var(--purple-700);
    padding: 8px 16px;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
}
.lambda-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    flex-wrap: wrap;
}
.lambda-sym {
    color: var(--holo-cyan);
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
    font-family: inherit;
}
.lambda-input {
    background: transparent;
    border: none;
    color: var(--purple-200);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    flex: 1;
    min-width: 200px;
    caret-color: var(--holo-cyan);
}
.lambda-input::placeholder {
    color: rgba(157, 78, 221, 0.5);
}
.lambda-cursor {
    color: var(--holo-cyan);
    animation: cursorBlink 1s step-end infinite;
}
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.lambda-output {
    display: none;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(157, 78, 221, 0.3);
    font-size: 12px;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: var(--holo-soft);
    line-height: 1.5;
}
.lambda-output.active { display: block; }
.lambda-output .error { color: var(--danger); }
.lambda-output .success { color: var(--success); }
.lambda-output .info { color: var(--purple-300); }

/* Modals & Cyber Window */
.cyber-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    background: rgba(5, 3, 12, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}
.cyber-modal-overlay.active { display: flex; }

.cyber-window {
    background: #140b29;
    border: 1px solid var(--holo-cyan);
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.35), inset 0 0 25px rgba(157, 78, 221, 0.15);
    overflow: hidden;
}
.cyber-window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #1c1038;
    border-bottom: 1px solid var(--purple-500);
}
.cyber-window-header h3 {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--holo-cyan);
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.cyber-window-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

/* Skin Browser Grid */
.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}
.skin-card {
    background: #0f0820;
    border: 1px solid var(--purple-700);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.skin-card:hover {
    border-color: var(--holo-cyan);
    background: #170e30;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.25);
    transform: translateY(-2px);
}
.skin-preview-box {
    width: 110px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(157,78,221,0.15) 0%, rgba(10,5,20,0.8) 80%);
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid rgba(157, 78, 221, 0.3);
}
.skin-preview-img {
    max-width: 100px;
    max-height: 130px;
    image-rendering: pixelated;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.3));
}
.skin-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-bright);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.skin-author {
    font-size: 0.72rem;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.skin-actions {
    display: flex;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}
.wear-btn {
    flex: 1;
    padding: 6px 4px;
    font-size: 0.72rem;
    font-weight: bold;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(123, 44, 191, 0.3));
    color: var(--holo-cyan);
    border: 1px solid var(--holo-cyan);
    border-radius: 3px;
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
}
.wear-btn:hover {
    background: var(--holo-cyan);
    color: var(--bg-void);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.7);
}
.dl-skin-btn {
    padding: 6px 8px;
    font-size: 0.72rem;
    color: var(--purple-200);
    border: 1px solid var(--purple-500);
    border-radius: 3px;
    background: rgba(157, 78, 221, 0.15);
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}
.dl-skin-btn:hover {
    border-color: var(--holo-cyan);
    color: var(--holo-cyan);
}

/* Scrape Box in Skin Browser */
.skin-scrape-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #0e071c;
    border: 1px solid var(--purple-700);
    border-radius: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.skin-scrape-input {
    flex: 1;
    min-width: 220px;
    background: var(--bg-input);
    border: 1px solid var(--purple-700);
    color: var(--purple-200);
    padding: 8px 10px;
    font-family: inherit;
    font-size: 0.82rem;
    border-radius: 4px;
    outline: none;
}
.skin-scrape-input:focus {
    border-color: var(--holo-cyan);
}

/* Mobile */
@media (max-width: 768px) {
    .panel-topbar { padding: 8px 12px; }
    .panel-dock { padding: 6px 10px; }
    .main-pane { padding: 6px 8px 10px; }
    .dock-item { padding: 5px 10px; font-size: 0.78rem; }
    .identity-text h2 { font-size: 0.95rem; }
    .pane-header { padding: 6px 10px; font-size: 0.75rem; }
    .skin-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* m1necr4ft tab hub */
.mn-tabs { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px; padding-bottom:8px; border-bottom:1px solid var(--purple-700); }
.mn-tab { font-family:inherit; font-size:0.78rem; letter-spacing:1px; text-transform:uppercase; text-decoration:none; cursor:pointer; padding:6px 12px; color:#9d7ab8; background:rgba(26,16,48,0.8); border:1px solid var(--purple-700); }
.mn-tab:hover { color:var(--holo-cyan); border-color:var(--holo-cyan); }
.mn-tab.on { color:#0a0714; background:var(--holo-cyan); border-color:var(--holo-cyan); font-weight:bold; }
.mn-tab.mn-pop { margin-left:auto; }
.mn-frame { display:block; width:100%; height:min(640px,70vh); border:1px solid var(--purple-700); background:#0a0714; }
