/* =========================================
   NEOBIN.NET - DESIGN SYSTEM & THEME
   Style: Dark Mode, Glassmorphism, Modern Clean
   Font: Poppins (Google Fonts)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

:root {
    /* Core Colors */
    --bg-deep: #0a0a0a;          /* Deep OLED Black */
    --text-main: #ffffff;        /* Pure White */
    --text-muted: #a1a1aa;       /* Muted Grey for subtitles */
    
    /* Gradients (Apple/Google Style) */
    --gradient-primary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);  /* Blue/Cyan */
    --gradient-secondary: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); /* Green/Teal */
    --gradient-text: -webkit-linear-gradient(0deg, #ffffff 30%, #a1a1aa 100%); /* Metallic Text */

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(10px);
}

/* 2. BASE TYPOGRAPHY & RESET */
* {
    box-sizing: border-box; /* Fixes the scrollbar/sizing issues */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    height: 100vh;
    width: 100%;
    overflow: hidden; /* Prevents scrolling on the body */
}

h1, h2, h3 {
    font-weight: 600;
}

/* 3. UTILITY CLASSES */

/* The "Glass" Effect Card */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur); /* Safari support */
    border-radius: 24px;
    padding: 30px;
    transition: transform 0.3s ease, background 0.3s ease, border 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

/* The Gradient Text Headline (Use for Main Title) */
.text-gradient {
    font-weight: 800;
    letter-spacing: -2px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4. BACKGROUND ANIMATION (The "Blobs") */
.ambient-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1; /* Puts it behind everything */
    pointer-events: none;
}

.ambient-light {
    position: absolute;
    width: 60vw;
    height: 60vw;
    background: var(--gradient-primary);
    filter: blur(150px);
    opacity: 0.15;
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

.ambient-light.secondary {
    background: var(--gradient-secondary);
    right: -10vw;
    bottom: -10vw;
    animation-delay: 5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}

/* 5. LAYOUT & DASHBOARD */
.center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center; /* Vertically center everything */
    height: 100%;
    width: 100%;
    padding: 20px;
    gap: 20px; /* Space between cards when explorer is open */
    transition: all 0.5s ease;
}

.main-card {
    text-align: center;
    width: 500px; /* Restored to original size */
    max-width: 100%;
    padding: 50px 40px;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: width 0.5s ease;
    flex-shrink: 0; /* Prevents squishing */
}

.status-badge {
    display: inline-flex;
    align-items: center;
    /* Made background/border slightly stronger so the pill shape is visible by default */
    background: rgba(255, 255, 255, 0.08); 
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

/* EXPLORER CARD (Slide-out) */
.explorer-card {
    width: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    border: none;
    height: 500px; /* Match closer to main card height */
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    /* Removed margin-top to allow perfect centering */
}

.explorer-card.visible {
    width: 380px;
    opacity: 1;
    padding: 20px;
    border: 1px solid var(--glass-border);
    margin-left: 10px;
}

.explorer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.explorer-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
}
.close-btn:hover { color: white; }

.explorer-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    background: rgba(255,255,255,0.02);
    border: 1px solid transparent;
    padding: 8px;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: rgba(255,255,255,0.05);
}

/* New Active Style: Glass Border instead of Gradient */
.tab-btn.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    color: white;
}

.explorer-content {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 5px; /* Space for scrollbar */
}

/* Custom Scrollbar for Explorer */
.explorer-content::-webkit-scrollbar { width: 4px; }
.explorer-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* TOOLS PANEL */
.explorer-tools {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.btn-tool {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    flex-grow: 1;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-tool:hover { background: rgba(255,255,255,0.1); color: white; }
.full-width { width: 100%; }

/* --- PRIVACY SWITCH (REFINED) --- */
.privacy-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 3px;
    transition: all 0.3s;
    width: 60px; /* Small fixed width */
    height: 28px;
    position: relative;
    flex-shrink: 0;
}

.privacy-switch.private { border-color: #ff5f5f; }
.privacy-switch.public { border-color: #43e97b; }

.switch-knob {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-size: 0.7rem;
    position: absolute;
    left: 3px; /* Start position */
}

/* Knob Movement Logic */
.privacy-switch.private .switch-knob { transform: translateX(0); background: #ff5f5f; color: white; }
.privacy-switch.public .switch-knob { transform: translateX(32px); background: #43e97b; color: white; }

/* Icons inside the switch */
.switch-icon { pointer-events: none; }

/* PROGRESS BAR */
.progress-bar-container {
    height: 6px;
    width: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.2s;
    position: absolute;
    left: 0;
}
.progress-text {
    font-size: 9px;
    color: white;
    z-index: 2;
    text-shadow: 0 0 2px black;
}

/* LIST ITEMS */
.list-item {
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
    overflow: hidden;
}

.list-item.active {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    cursor: pointer;
}

.item-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.item-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.tag-exp {
    font-size: 0.7rem;
    color: #ff9f43;
    margin-top: 2px;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 4px;
}

.always-visible-actions {
    display: flex;
    gap: 5px;
}

.icon-btn {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-decoration: none;
}

.icon-btn:hover {
    background: white;
    color: black;
}

/* Expanded Options */
.item-options {
    display: none; /* Hidden by default */
    padding: 10px 12px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
    gap: 8px;
    justify-content: space-between;
}

.list-item.active .item-options {
    display: flex;
    animation: slideDown 0.2s ease;
}

/* --- FIX: Disable animation for refreshes --- */
.list-item.active.no-anim .item-options {
    animation: none;
}

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

.opt-btn {
    flex: 1;
    padding: 6px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}

.opt-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.opt-btn.danger:hover {
    background: rgba(255, 95, 95, 0.2);
    color: #ff5f5f;
    border-color: #ff5f5f;
}

.action-btn {
    color: var(--text-muted);
}

/* TERMINAL */
.console-box {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    color: #4facfe; /* Blue text */
    text-align: left;
    min-height: 48px; 
    max-height: 50vh; /* Reduced slightly to fit better */
    overflow-y: auto;
    display: flex;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.console-prompt {
    color: var(--text-muted);
    margin-right: 10px;
    user-select: none;
    font-weight: bold;
    flex-shrink: 0;
}

.console-input {
    color: #fff;
    flex-grow: 1;
    white-space: pre-wrap;
    word-break: break-word;
    opacity: 0.9;
}

/* SYSTEM STATS */
.stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}
.stat-header span:last-child {
    color: white;
    font-family: monospace;
}

/* Helper for messages */
.msg-success { color: #43e97b; }
.msg-error { color: #ff5f5f; }
.msg-info { color: #a1a1aa; }