:root {
    --bg-base: #20272f;
    --bg-glass: rgba(39, 48, 58, 0.75);
    --bg-glass-hover: rgba(47, 58, 70, 0.85);
    --border-glass: rgba(219, 202, 173, 0.12);
    --text-main: #f3f0eb;
    --text-muted: #9aa3ab;
    --primary: #9e7836;
    --primary-hover: #86642d;
    --primary-glow: rgba(158, 120, 54, 0.22);
    --accent: #dbcaad;
    --danger: #e7543c;
    --warning: #dbcaad;
    --sidebar-width: 260px;
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Category Accent Colors (Regenesis v12) */
.cat-tools { --cat-color: #dbcaad; }
.cat-research { --cat-color: #9e7836; }
.cat-default { --cat-color: #9e7836; }

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    background: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow: hidden;
}

h1, h2, h3, h4, h5, h6, .page-title, .modal-title, .hero-title, .panel-title {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.04em;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

.hidden {
    display: none !important;
}

/* Background animated blobs */
.mesh-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -10;
    background: var(--bg-base);
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.1;
    animation: floatBlob 30s infinite alternate ease-in-out;
}

.blob1 {
    width: 700px; height: 700px;
    background: var(--primary);
    top: -15%; left: -15%;
}

.blob2 {
    width: 600px; height: 600px;
    background: #10b981;
    bottom: -15%; right: -15%;
    animation-delay: -8s;
}

.blob3 {
    width: 500px; height: 500px;
    background: #a855f7;
    top: 35%; left: 35%;
    animation-delay: -16s;
}

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

/* App Grid container */
#app {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Navigation */
.sidebar {
    background: rgba(8, 12, 22, 0.75);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--border-glass);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 2.5rem;
}

.logo ion-icon {
    font-size: 2.2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    transition: var(--transition-smooth);
    width: 100%;
}

.nav-item ion-icon {
    font-size: 1.3rem;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: inset 4px 0 0 var(--primary);
}

.nav-item.active ion-icon {
    color: var(--primary);
    transform: scale(1.05);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 2rem 0;
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.quick-launch-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    overflow-y: auto;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.quick-launch-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.quick-launch-item a ion-icon {
    font-size: 1.15rem;
}

.quick-launch-item a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(3px);
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-glass);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pulse-dot-green {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    animation: simplePulse 2s infinite;
}

@keyframes simplePulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: rgba(7, 10, 19, 0.15);
    min-width: 0;
    overflow-x: hidden;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3rem;
    background: rgba(7, 10, 19, 0.25);
    border-bottom: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.55rem 1rem;
    width: 320px;
    gap: 0.75rem;
    transition: var(--transition-smooth);
}

.search-container ion-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.search-container input {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
}

.search-container input:focus {
    outline: none;
}

.search-container:focus-within {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.08);
}

.user-panel {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.45rem 1.1rem;
    border-radius: 30px;
    border: 1px solid var(--border-glass);
}

/* Scroll Container */
.content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2.5rem 3rem;
    min-width: 0;
}

/* View Sections */
.view-section {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.3rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ==========================================================================
   BENTO SYSTEM LAYOUT (v3)
   ========================================================================== */

.bento-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .bento-container {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

.bento-card {
    border-radius: 20px;
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Bento Widget: Gateway Hub status */
.bento-hub {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.widget-title {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.widget-subtitle {
    color: var(--text-muted);
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.hub-dials {
    display: flex;
    gap: 1.5rem;
}

.dial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 55px;
}

.dial-svg {
    width: 100%;
    height: 55px;
    transform: rotate(-90deg);
}

.dial-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 3.5;
}

.dial-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3.5;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

#ram-dial {
    stroke: var(--accent);
}

.dial-label {
    position: absolute;
    top: 23px;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: 800;
}

.dial-name {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.35rem;
}

/* Terminal Mockup in Bento Hub */
.terminal-mockup {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.terminal-header {
    background: rgba(15, 23, 42, 0.85);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.t-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.t-red { background: #ef4444; }
.t-yellow { background: #f59e0b; }
.t-green { background: #10b981; }

.t-title {
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

.terminal-body {
    background: #030712;
    padding: 1rem;
    height: 125px;
    overflow-y: auto;
}

.terminal-logs {
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.log-line {
    word-break: break-all;
}

.log-line.text-muted {
    color: var(--text-muted);
}

.log-line.text-accent {
    color: var(--accent);
}

/* Bento Widget: Filter Directory */
.bento-filters {
    padding: 2rem;
    height: 100%;
}

.widget-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.bento-filters .categories {
    flex-direction: column;
    gap: 0.5rem;
}

.bento-filters .category-btn {
    width: 100%;
    text-align: left;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
}

/* Bento Grid: Apps */
.bento-apps {
    grid-column: 1 / -1;
}

/* Category Filter Tags */
.categories {
    display: flex;
    gap: 0.75rem;
}

.category-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* App Grid & Cards (Modern Netflix + Accents) */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 2rem;
}

.app-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 1.8rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 210px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Color Accent Top Bar */
.app-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--cat-color, var(--primary));
    transition: var(--transition-smooth);
}

.app-card:hover {
    transform: translateY(-6px);
    background: var(--bg-glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.05);
}

.app-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: var(--transition-smooth);
}

.app-icon-wrapper ion-icon {
    font-size: 1.8rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.app-card:hover .app-icon-wrapper {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--cat-color, var(--primary));
}

.app-card:hover .app-icon-wrapper ion-icon {
    color: var(--cat-color, var(--primary));
    transform: scale(1.1);
}

.app-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.app-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    flex: 1;
    margin-bottom: 1.25rem;
}

.app-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.85rem;
}

.app-url {
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.app-card:hover .app-url {
    color: var(--text-main);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
}

.status-badge.online {
    color: var(--accent);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-badge.offline {
    color: var(--danger);
    border-color: rgba(244, 63, 94, 0.2);
}

.status-badge.unknown {
    color: var(--text-muted);
}

.status-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.online .dot {
    box-shadow: 0 0 6px var(--accent);
}

/* Settings Layout */
.settings-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

.settings-card {
    padding: 2.2rem;
    border-radius: 20px;
}

.panel-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.75rem;
}

/* Glass table */
.table-container {
    overflow-x: auto;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.app-table th {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.app-table td {
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.app-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.service-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.service-cell ion-icon {
    font-size: 1.25rem;
    color: var(--primary);
}

.subdomain-badge {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.target-cell {
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-icon.edit:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-icon.delete:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

input, textarea, select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

select option {
    background: #0f172a;
    color: var(--text-main);
}

.field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.empty-state ion-icon {
    font-size: 4rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 1rem;
}

/* Toasts */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: rgba(17, 25, 40, 0.9);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    min-width: 280px;
}

.toast.success { border-left: 4px solid var(--accent); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive design */
@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    #app {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    header {
        padding: 1rem 1.5rem;
    }
    .content-scroll {
        padding: 2rem 1.5rem;
    }
}

/* ==========================================================================
   APP DETAILS PREVIEW MODAL
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: rgba(4, 6, 12, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-container {
    width: 100%;
    max-width: 1300px;
    height: 100%;
    max-height: 800px;
    display: grid;
    grid-template-columns: 380px 1fr;
    border-radius: 24px;
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

@keyframes modalSlideIn {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Left Details Sidebar */
.modal-sidebar {
    background: rgba(10, 15, 30, 0.85);
    border-right: 1px solid var(--border-glass);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    overflow-y: auto;
}

.modal-sidebar-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.modal-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.2rem;
}

.category-badge {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
    margin-top: 0.15rem;
}

.modal-body-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex-grow: 1;
    margin-bottom: 2.5rem;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.info-group label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.modal-desc {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.85;
}

.connection-details {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.85rem;
}

.connection-details div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.connection-details strong {
    color: var(--text-muted);
}

.connection-details span {
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    color: var(--text-main);
    word-break: break-all;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem;
    font-size: 0.95rem;
}

/* Right Preview Window */
.modal-preview-panel {
    background: rgba(4, 6, 12, 0.4);
    padding: 1.5rem;
    display: flex;
    height: 100%;
}

.browser-mockup {
    width: 100%;
    height: 100%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.browser-header {
    background: #0f172a;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.browser-controls {
    display: flex;
    gap: 6px;
}

.browser-controls .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
}

.browser-controls .close { background-color: #ff5f56; }
.browser-controls .minimize { background-color: #ffbd2e; }
.browser-controls .maximize { background-color: #27c93f; }

.browser-address-bar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.4rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-grow: 1;
    max-width: 600px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    user-select: none;
}

.browser-address-bar ion-icon {
    font-size: 0.95rem;
}

.browser-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    padding: 0.2rem;
    border-radius: 4px;
}

.browser-action-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.browser-body {
    flex-grow: 1;
    position: relative;
    background: #ffffff;
}

.browser-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

/* Loading Spinner */
.preview-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-base);
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    transition: opacity 0.3s ease;
    color: var(--text-muted);
}

.preview-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive styling for modal */
@media (max-width: 900px) {
    .modal-overlay {
        padding: 1rem;
    }
    .modal-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        max-height: 95vh;
        height: auto;
    }
    .modal-sidebar {
        padding: 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
        height: auto;
        justify-content: flex-start;
    }
    .modal-preview-panel {
        padding: 1rem;
        height: 350px;
    }
    .modal-body-content {
        margin-bottom: 1rem;
        gap: 1rem;
    }
    .modal-actions {
        flex-direction: row;
    }
}

/* ==========================================================================
   ICON PICKER & SELECTORS (v3)
   ========================================================================== */

.icon-picker-container {
    position: relative;
    width: 100%;
}

#icon-picker-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    font-weight: 500;
}

#icon-picker-btn ion-icon {
    font-size: 1.35rem;
    color: var(--primary);
}

.icon-picker-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    background: #0f172a;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 0.75rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    width: 250px;
    max-height: 180px;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
    animation: popoverFade 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.picker-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.35rem;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.picker-icon-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.1);
}

.picker-icon-btn.selected {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

/* ==========================================================================
   VIEW TOGGLES & LIST VIEW (v4)
   ========================================================================== */

.apps-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.apps-header-row .widget-section-title {
    margin-bottom: 0;
}

.view-toggle-container {
    display: flex;
    padding: 0.25rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.view-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.view-toggle-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.view-toggle-btn.active {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* List View Layout Overrides */
.app-grid.list-view {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.app-grid.list-view .app-card {
    flex-direction: row;
    align-items: center;
    min-height: auto;
    padding: 1rem 1.75rem;
    gap: 1.5rem;
    border-radius: 14px;
}

.app-grid.list-view .app-card::before {
    top: 0; left: 0; bottom: 0;
    width: 4px;
    height: 100%;
}

.app-grid.list-view .app-icon-wrapper {
    margin-bottom: 0;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.app-grid.list-view .app-icon-wrapper ion-icon {
    font-size: 1.5rem;
}

.app-grid.list-view .app-card-title {
    font-size: 1.15rem;
    margin-bottom: 0;
    width: 220px;
    flex-shrink: 0;
}

.app-grid.list-view .app-card-desc {
    margin-bottom: 0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.75;
}

.app-grid.list-view .app-card-footer {
    border-top: none;
    padding-top: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: auto;
    flex-shrink: 0;
    margin-left: auto;
}

.app-grid.list-view .app-url {
    max-width: 180px;
}

/* Service Type Selector Pills */
.type-selector-container {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.25rem;
    gap: 0.25rem;
}

.type-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.type-pill:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.type-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.type-pill ion-icon {
    font-size: 1.1rem;
}

/* Custom Browser Preview Placeholders */
.browser-placeholder-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #0f172a;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.placeholder-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 0 20px var(--primary-glow);
}

.browser-placeholder-overlay.warning .placeholder-icon-wrapper {
    color: var(--danger);
    background: rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.15);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.1);
}

.browser-placeholder-overlay h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
}

.browser-placeholder-overlay p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 320px;
    line-height: 1.5;
}

/* Custom Inline Category Tag on List Cards */
.cat-tag-list {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    color: var(--cat-color);
}

/* ==========================================================================
   DISNEY+ UI STYLE OVERRIDES (v5)
   ========================================================================== */

.hero-banner {
    position: relative;
    height: 350px;
    border-radius: 16px;
    margin-bottom: 2.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #0e111a 0%, #1e2230 100%);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    padding: 3.5rem;
    transition: var(--transition-smooth);
}

.hero-gradient-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 82% 50%, rgba(99, 102, 241, 0.16) 0%, rgba(26, 29, 41, 0) 70%),
                linear-gradient(90deg, #10121b 0%, rgba(16, 18, 27, 0.8) 45%, rgba(26, 29, 41, 0) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hero-badge {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -1px;
    line-height: 1.15;
}

.hero-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.hero-actions .btn-primary {
    background: #ffffff;
    color: #1a1d29;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    padding: 0.8rem 2.2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition-smooth);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.hero-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.88);
    transform: scale(1.03);
}

.hero-actions .btn-secondary {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.hero-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
    transform: scale(1.03);
}

/* Brand Hubs (Disney+ Categories Grid / Scrollable) */
.brand-hubs {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    overflow-x: auto;
    padding-bottom: 0.8rem;
}

.brand-tile {
    flex: 0 0 140px;
    position: relative;
    height: 95px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, #202434 0%, #101219 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

.brand-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.brand-tile:hover {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.3);
}

.brand-tile:hover::before {
    opacity: 1;
}

.brand-tile ion-icon {
    font-size: 2.1rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.brand-tile:hover ion-icon {
    transform: scale(1.15);
    color: var(--cat-color);
}

.brand-tile-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #a0a6b5;
    transition: var(--transition-smooth);
}

.brand-tile:hover .brand-tile-title {
    color: #ffffff;
}

/* Horizontally Scrolling Shelves Layout */
.shelves-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.shelf-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.shelf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-left: 0.2rem;
}

.shelf-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f9f9f9;
    letter-spacing: -0.2px;
}

.shelf-cards {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.6rem 0.3rem 1.6rem 0.3rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    scroll-behavior: smooth;
}

.shelf-cards::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

/* Horizontal Cinema Card Overrides */
.shelf-row .app-card {
    flex-shrink: 0;
    width: 260px;
    height: 146px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, #1e2230 0%, #10121a 100%);
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    min-height: auto;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.shelf-row .app-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--cat-color, var(--primary));
    opacity: 0.85;
    z-index: 5;
}

.shelf-row .app-icon-wrapper {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    margin-bottom: 0;
    position: absolute;
    top: 0; left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.shelf-row .app-icon-wrapper ion-icon {
    font-size: 3.8rem;
    color: rgba(255, 255, 255, 0.12);
    transition: all 0.35s ease;
}

.shelf-row .app-card-info-group {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1.25rem 1.25rem 0.85rem 1.25rem;
    z-index: 3;
    background: linear-gradient(to top, rgba(16, 18, 27, 0.9) 0%, rgba(16, 18, 27, 0) 100%);
    transition: all 0.3s ease;
}

.shelf-row .app-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
    letter-spacing: -0.2px;
}

.shelf-row .app-card-desc {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(13, 16, 25, 0.96);
    padding: 1.2rem;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 4;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.shelf-row .app-card-footer {
    display: none;
}

/* Disney+ Active Card Hover Transitions */
.shelf-row .app-card:hover {
    transform: scale(1.08) translateY(-4px);
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.6), 0 0 20px var(--cat-color);
    z-index: 10;
}

.shelf-row .app-card:hover .app-icon-wrapper ion-icon {
    color: var(--cat-color);
    transform: scale(1.15);
}

.shelf-row .app-card:hover .app-card-desc {
    opacity: 1;
}

/* Grab to Scroll States (v6) */
.shelf-cards {
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.shelf-cards.grabbing {
    cursor: grabbing;
    scroll-behavior: auto; /* disable smooth scrolling while dragging for precise tracking */
}

.shelf-cards.grabbing .app-card {
    transform: none !important;
    box-shadow: 0 10px 22px rgba(0,0,0,0.35) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    cursor: grabbing;
}

/* Card Selection Highlight Ring (v6) */
.shelf-row .app-card.selected-card {
    border-color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.02) translateY(-2px) !important;
    z-index: 8;
}

/* Hero Content Transitions (v6) */
.hero-content {
    transition: opacity 0.22s ease-in-out, transform 0.22s ease-in-out;
}

.hero-content.fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

/* Full page detail screen tab (v7) */
.detail-tab-container {
    display: flex;
    gap: 2.5rem;
    height: calc(100vh - 140px); /* Fill screen content scroll space */
    width: 100%;
    animation: fadeIn 0.4s ease-out;
}

.detail-tab-container .modal-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2rem;
    padding: 0;
    height: 100%;
    border-right: none;
    background: transparent;
}

.detail-tab-container .modal-preview-panel {
    flex: 1;
    height: 100%;
    padding: 0;
    background: transparent;
    display: flex;
}

/* Category Quick Access Shelf styling (v7) */
.category-quick-apps {
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease-out;
}

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

.quick-apps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-left: 0.2rem;
}

.quick-apps-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Disney+ Split Category Hero Layout (v8/v9) */
.hero-banner {
    display: block;
    min-height: 250px;
    position: relative;
    padding: 3rem;
    background: radial-gradient(circle at 10% 50%, rgba(30, 35, 54, 0.95) 0%, rgba(20, 24, 38, 0.85) 60%, rgba(13, 16, 25, 0.95) 100%);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    margin-bottom: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeIn 0.4s ease-out;
}

.hero-banner.split-hero {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    min-height: 380px;
    padding: 2.2rem;
}

.hero-info-panel {
    flex: 0 0 35%;
    max-width: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 5;
}

.hero-cards-panel {
    flex: 1;
    overflow-x: auto;
    display: flex;
    align-items: center;
    z-index: 5;
    padding: 0.5rem 0.5rem 0.8rem 0.5rem;
}

/* Thin elegant scrollbar for scrolling cards & shelves & categories (v9) */
.hero-cards-panel::-webkit-scrollbar,
.shelves-container::-webkit-scrollbar,
.shelf-cards::-webkit-scrollbar,
.brand-hubs::-webkit-scrollbar {
    display: block !important;
    height: 6px !important;
}
.hero-cards-panel::-webkit-scrollbar-track,
.shelves-container::-webkit-scrollbar-track,
.shelf-cards::-webkit-scrollbar-track,
.brand-hubs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 4px !important;
}
.hero-cards-panel::-webkit-scrollbar-thumb,
.shelves-container::-webkit-scrollbar-thumb,
.shelf-cards::-webkit-scrollbar-thumb,
.brand-hubs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
    transition: background 0.3s ease !important;
}
.hero-cards-panel::-webkit-scrollbar-thumb:hover,
.shelves-container::-webkit-scrollbar-thumb:hover,
.shelf-cards::-webkit-scrollbar-thumb:hover,
.brand-hubs::-webkit-scrollbar-thumb:hover {
    background: var(--primary) !important;
}

.hero-cards-panel .shelf-cards {
    display: flex;
    gap: 1.5rem;
    padding: 0 0 0.4rem 0;
    width: max-content;
}

/* Disney+ Vertical Poster Cards with Web Captures (v8) */
.split-hero .app-card {
    width: 170px;
    height: auto;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #141724;
    border-radius: 12px;
    border: 2.2px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    flex-shrink: 0;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    text-decoration: none;
}

/* Sidebar Stats Panel (v9) */
.sidebar-stats {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

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

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Fragment Mono', monospace;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Mock Webpage Capture inside poster cards */
.split-hero .app-card .mock-capture {
    flex: 1;
    width: 100%;
    background: #0d0f17;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.04);
}

.split-hero .app-card .mock-capture-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    padding: 0 5px;
    gap: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.split-hero .app-card .mock-capture-dot {
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.split-hero .app-card .mock-capture-body {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.split-hero .app-card .mock-capture-hero {
    height: 36px;
    border-radius: 5px;
    background: linear-gradient(135deg, var(--cat-color) 0%, rgba(255, 255, 255, 0.03) 100%);
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.18);
}

.split-hero .app-card .mock-capture-line {
    height: 3.5px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.08);
    width: 80%;
}

.split-hero .app-card .mock-capture-line.short {
    width: 50%;
}

.split-hero .app-card .mock-capture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 2px;
}

.split-hero .app-card .mock-capture-grid-item {
    height: 14px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.04);
}

.split-hero .app-card .app-poster-title {
    padding: 0.65rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    background: #141724;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.35;
    height: auto;
    min-height: 2.7em;
    overflow: visible;
    transition: color 0.25s ease;
}

/* Accurate screenshot capture styles (v8) */
.split-hero .app-card img.screenshot-capture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    z-index: 2;
    transition: transform 0.4s ease;
}

.split-hero .app-card:hover img.screenshot-capture {
    transform: scale(1.06);
}

/* Grabbing states inside Split Poster row */
.hero-cards-panel .shelf-cards.grabbing .app-card {
    transform: none !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.split-hero .app-card:hover {
    transform: scale(1.06) translateY(-4px) !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.65), 0 0 18px var(--cat-color) !important;
}

.split-hero .app-card:hover .app-poster-title {
    color: #ffffff;
}

.split-hero .app-card.selected-card {
    transform: scale(1.02) !important;
    border-color: #ffffff !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.35) !important;
    z-index: 10;
}

/* Modal popups reverted (v8) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 12, 18, 0.82);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 2.2rem;
    animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-container {
    width: 100%;
    max-width: 1100px;
    height: 80vh;
    max-height: 650px;
    display: grid;
    grid-template-columns: 350px 1fr;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    background: var(--bg-card);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-sidebar {
    background: #111420;
    border-right: 1px solid var(--border-glass);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.modal-preview-panel {
    background: rgba(4, 6, 12, 0.4);
    padding: 1.5rem;
    display: flex;
    height: 100%;
}

/* Responsive adjustments for Split Category Hero (v8) */
@media (max-width: 992px) {
    .hero-banner.split-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 2rem;
        min-height: auto;
        padding: 1.5rem;
    }
    
    .hero-info-panel {
        flex: 1;
        max-width: 100%;
    }
    
    .hero-cards-panel {
        width: 100%;
    }
}
