/* ==========================================================================
   1. GLOBAL RESET & CYBERPUNK BASE THEME
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    overflow-x: hidden;
    height: 100vh;
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #111;
}
::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #00ffcc;
}

/* ==========================================================================
   2. GATEWAY LOGIN PAGE
   ========================================================================== */
.login-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 15, 15, 0.95);
    border: 2px solid #27ae60;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.3);
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    z-index: 999;
    text-align: center;
}

.login-container h2 {
    color: #27ae60;
    font-size: 26px;
    margin-bottom: 5px;
    text-shadow: 0 0 8px rgba(39,174,96,0.4);
}

.subtitle {
    font-size: 12px;
    color: #888;
    margin-bottom: 25px;
}

.input-group {
    text-align: left;
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
    font-weight: 600;
}

.input-group input, 
.input-group select, 
.input-group textarea {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    border-color: #00ffcc;
    box-shadow: 0 0 5px rgba(0, 255, 204, 0.3);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #27ae60;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

.error-msg {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 10px;
    display: none;
}

/* ==========================================================================
   3. CORE APP DASHBOARD LAYOUT & HUD HEADER
   ========================================================================== */
.dashboard {
    display: none;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.web-top-header {
    background: #111;
    border-bottom: 2px solid #333;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.web-top-header h1 {
    font-size: 18px;
    color: #00ffcc;
    text-shadow: 0 0 5px rgba(0,255,204,0.3);
}

.hud-live-container {
    font-family: monospace;
    font-size: 13px;
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.05);
    padding: 5px 10px;
    border: 1px solid #f1c40f;
    border-radius: 4px;
}

.header-user-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user-status img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #00ffcc;
    object-fit: cover;
}

.user-meta {
    display: flex;
    flex-direction: column;
    font-size: 12px;
}

.role-badge {
    background: #2980b9;
    color: white;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    width: max-content;
    margin-top: 2px;
}

.dashboard-layout-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ==========================================================================
   4. SIDEBAR NAVIGATION LEFT
   ========================================================================== */
.sidebar-left-nav {
    width: 260px;
    background: #141414;
    border-right: 1px solid #222;
    padding: 15px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.wallet-display-box {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
}

.wallet-display-box p {
    font-size: 11px;
    color: #cbd5e1;
    text-transform: uppercase;
}

.wallet-display-box strong {
    font-size: 20px;
    color: #fff;
    display: block;
    margin-top: 3px;
}

.nav-menu-title {
    font-size: 11px;
    color: #555;
    font-weight: bold;
    margin: 15px 0 5px 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn {
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: #999;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #222;
    color: #fff;
}

.tab-btn.active {
    background: rgba(0, 255, 204, 0.1);
    color: #00ffcc;
    border-left: 3px solid #00ffcc;
    font-weight: bold;
}

.sidebar-footer-actions {
    margin-top: auto;
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topup-btn {
    background: #c0392b;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.logout-btn {
    background: #333;
    color: #ccc;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}
.logout-btn:hover { background: #444; color: #fff; }

/* ==========================================================================
   5. CENTRAL CONTENT ENGINE (TABS & CARDS)
   ========================================================================== */
.main-content-center {
    flex: 1;
    background: #0d0d0d;
    padding: 20px;
    overflow-y: auto;
}

.tab-content {
    display: none;
    height: 100%;
}

.tab-content.active {
    display: block;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    height: 100%;
}

.card {
    background: #161616;
    border: 1px solid #252525;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

.card h3 {
    font-size: 15px;
    margin-bottom: 15px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}

.role-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
}

.role-list li {
    background: #1f1f1f;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   6. INTERACTIVE CHAT ENGINE & TIMELINE FEEDS
   ========================================================================== */
.flex-chat {
    display: flex;
    flex-direction: column;
    height: 480px;
}

.chat-box {
    flex: 1;
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 10px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.chat-msg {
    background: #1c1c1c;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
    position: relative;
    word-break: break-word;
}

.chat-msg strong {
    color: #00ffcc;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 10px;
}

.chat-input-area, .chat-input-area-v3 {
    display: flex;
    gap: 5px;
}

.chat-input-area input, .chat-input-area-v3 input {
    flex: 1;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    outline: none;
}

.chat-input-area button, .chat-input-area-v3 button {
    padding: 0 15px;
    background: #2980b9;
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

.input-row {
    display: flex;
    width: 100%;
    gap: 5px;
}

.profile-header-view {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.large-profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2980b9;
}

.profile-bio-box {
    background: #111;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
}

.media-actions-row {
    display: flex;
    gap: 5px;
}

.media-chat-upload {
    position: relative;
    padding: 6px;
    text-align: center;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.media-chat-upload input[type="file"] {
    position: absolute;
    left: 0; top: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer;
}

.feed-post-card {
    background: #1f1f1f;
    border-left: 4px solid #2980b9;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.feed-post-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #777;
    margin-bottom: 6px;
}

.feed-post-media-box {
    margin-top: 8px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    text-align: center;
}

.feed-img-render, .feed-vid-render {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* ==========================================================================
   7. VOICE CHANNELS SYSTEM
   ========================================================================== */
.voice-controls-panel {
    display: flex;
    gap: 10px;
}

.voice-btn-join { background: #2ecc71; color: black; border: none; padding: 10px 15px; font-weight: bold; border-radius: 4px; cursor: pointer; }
.voice-btn-leave { background: #e74c3c; color: white; border: none; padding: 10px 15px; font-weight: bold; border-radius: 4px; cursor: pointer; }
.voice-btn-mute { background: #f39c12; color: black; border: none; padding: 10px 15px; font-weight: bold; border-radius: 4px; cursor: pointer; }

.voice-users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voice-user-node {
    background: #222;
    padding: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

/* ==========================================================================
   8. PREMIUM VIDEO DOWNLOADER STYLING
   ========================================================================== */
.downloader-result-wrapper {
    background: #111;
    padding: 15px;
    border-radius: 6px;
    border: 1px dashed #333;
}

.dl-loader-bar {
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    border-radius: 2px;
    transition: width 0.4s ease;
    margin-bottom: 10px;
}

/* ==========================================================================
   9. MARKETPLACE & MODAL DIALOGS
   ========================================================================== */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    max-height: 380px;
    overflow-y: auto;
}

.market-card {
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.market-card:hover { transform: scale(1.03); border-color: #3498db; }
.market-card img { width: 100%; height: 90px; object-fit: cover; border-radius: 4px; }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-card {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 25px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.qr-container-premium {
    background: white;
    padding: 10px;
    border-radius: 8px;
    width: 200px;
    height: 200px;
    margin: 15px auto;
}

.qr-container-premium img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.donation-description {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #bbb;
    line-height: 1.5;
}

/* ==========================================================================
   10. CALCULATOR PRO & CODE SANDBOX
   ========================================================================== */
.calc-wrapper {
    max-width: 280px;
    margin: 0 auto;
    background: #111;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
}

#calcDisplay {
    width: 100%;
    padding: 12px;
    background: #000;
    border: 1px solid #222;
    color: #00ffcc;
    text-align: right;
    font-size: 20px;
    font-family: monospace;
    margin-bottom: 10px;
    border-radius: 4px;
}

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

.calc-buttons-grid button {
    padding: 12px;
    background: #222;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}
.calc-buttons-grid button:hover { background: #333; }
.calc-buttons-grid .btn-op { background: #e67e22; color: black; }
.calc-buttons-grid .btn-c { background: #c0392b; color: white; }

.sandbox-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.sandbox-header {
    background: #222;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.run-btn-top { background: #2ecc71; border: none; padding: 5px 15px; font-weight: bold; cursor: pointer; border-radius: 4px; }

.sandbox-body {
    display: flex;
    flex: 1;
    height: 400px;
}

#codeEditor {
    flex: 1;
    background: #151515;
    color: #fff;
    font-family: monospace;
    padding: 10px;
    border: none;
    resize: none;
    outline: none;
}

#codeOutputWindow {
    flex: 1;
    background: white;
    color: black;
}

/* ==========================================================================
   11. INTERNAL OWNER ENGINE v7.6 (NEWLY INTEGRATED)
   ========================================================================== */
.secret-list-container {
    background: #111;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 6px;
    height: 220px;
    overflow-y: auto;
}

.bug-node-item {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 2px;
    color: #f9bfbf;
}

.saran-node-item {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 2px;
    color: #d2e7f7;
}

.secret-item-meta {
    font-size: 10px;
    color: #888;
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    border-top: 1px dashed #333;
    padding-top: 3px;
}