/* ==========================================================================
   EX SCREEN - Universal Samsung DeX Web OS Theme & Stylesheet
   Faithful to Samsung DeX & Android-Dex Desktop Experience
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLOR PALETTES & DYNAMIC THEMES
   -------------------------------------------------------------------------- */
:root {
    /* Default (Samsung One UI) */
    --bg-primary: #070b16;
    --bg-surface: rgba(13, 20, 36, 0.85);
    --bg-card: rgba(18, 27, 49, 0.7);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(56, 189, 248, 0.35);

    --accent-primary: #2563eb;
    --accent-glow: #38bdf8;
    --accent-hover: #1d4ed8;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --taskbar-bg: rgba(10, 15, 29, 0.88);
    --taskbar-height: 54px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-squircle: 22%;

    --shadow-window: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--border-glass);
    --shadow-active: 0 30px 70px -10px rgba(0, 0, 0, 0.9), 0 0 24px rgba(56, 189, 248, 0.3);

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* THEME 1: SAMSUNG ONE UI */
body.theme-samsung {
    --accent-primary: #2563eb;
    --accent-glow: #38bdf8;
    --border-glow: rgba(56, 189, 248, 0.4);
    --taskbar-bg: rgba(9, 14, 28, 0.88);
}

/* THEME 2: CYBERPUNK NEON */
body.theme-cyberpunk {
    --bg-primary: #0c0217;
    --bg-surface: rgba(22, 6, 38, 0.85);
    --bg-card: rgba(33, 10, 56, 0.7);
    --border-glass: rgba(236, 72, 153, 0.2);
    --border-glow: rgba(236, 72, 153, 0.5);
    --accent-primary: #ec4899;
    --accent-glow: #06b6d4;
    --taskbar-bg: rgba(14, 3, 26, 0.9);
}

/* THEME 3: AMOLED OBSIDIAN EMERALD */
body.theme-obsidian {
    --bg-primary: #000000;
    --bg-surface: rgba(8, 12, 10, 0.9);
    --bg-card: rgba(14, 20, 16, 0.75);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(16, 185, 129, 0.4);
    --accent-primary: #10b981;
    --accent-glow: #34d399;
    --taskbar-bg: rgba(0, 0, 0, 0.95);
}

/* THEME 4: TWILIGHT SUNSET */
body.theme-sunset {
    --bg-primary: #0c0817;
    --bg-surface: rgba(24, 14, 40, 0.85);
    --bg-card: rgba(36, 20, 58, 0.7);
    --border-glass: rgba(245, 158, 11, 0.2);
    --border-glow: rgba(245, 158, 11, 0.5);
    --accent-primary: #f59e0b;
    --accent-glow: #f43f5e;
    --taskbar-bg: rgba(14, 8, 26, 0.9);
}

/* THEME 5: TITANIUM FROST */
body.theme-frost {
    --bg-primary: #0f141f;
    --bg-surface: rgba(24, 32, 47, 0.85);
    --bg-card: rgba(33, 44, 65, 0.7);
    --border-glass: rgba(255, 255, 255, 0.18);
    --border-glow: rgba(147, 197, 253, 0.45);
    --accent-primary: #60a5fa;
    --accent-glow: #93c5fd;
    --taskbar-bg: rgba(17, 24, 39, 0.9);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body.dex-body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.35); }

/* --------------------------------------------------------------------------
   3. DESKTOP WORKSPACE & WALLPAPER
   -------------------------------------------------------------------------- */
.desktop-workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.desktop-wallpaper {
    position: absolute;
    inset: 0;
    background-image: url('../assets/wallpapers/dex-ai.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
    z-index: 1;
}

/* DESKTOP SHORTCUT ICONS (SAMSUNG DEX SQUIRCLES) */
.desktop-icons-grid {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.dex-desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    padding: 8px 4px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    text-align: center;
}
.dex-desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.dex-desktop-icon:active {
    transform: scale(0.95);
}

.icon-squircle {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}
.dex-desktop-icon:hover .icon-squircle {
    transform: scale(1.08);
}

.icon-phone { background: linear-gradient(135deg, #0284c7, #38bdf8); color: #fff; }
.icon-connect { background: linear-gradient(135deg, #059669, #34d399); color: #fff; }
.icon-themes { background: linear-gradient(135deg, #ec4899, #f43f5e); color: #fff; }
.icon-terminal { background: linear-gradient(135deg, #d97706, #fbbf24); color: #fff; }
.icon-files { background: linear-gradient(135deg, #ea580c, #fb923c); color: #fff; }
.icon-settings { background: linear-gradient(135deg, #4f46e5, #818cf8); color: #fff; }
.icon-guide { background: linear-gradient(135deg, #9333ea, #c084fc); color: #fff; }

.icon-title {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.2px;
}

/* --------------------------------------------------------------------------
   4. FLOATING DEX WINDOWS (ONE UI STYLE)
   -------------------------------------------------------------------------- */
.dex-window {
    position: absolute;
    background: var(--bg-surface);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-window);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 400px;
    min-height: 280px;
    z-index: 100;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dex-window.active {
    box-shadow: var(--shadow-active);
    border-color: var(--border-glow);
}

.dex-window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0;
}

.window-titlebar {
    height: 42px;
    background: rgba(10, 15, 29, 0.65);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    cursor: grab;
}
.window-titlebar:active { cursor: grabbing; }

.title-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.titlebar-app-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent-glow);
}

.stream-pill {
    font-size: 10px;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--accent-glow);
    font-family: var(--font-mono);
    font-weight: 600;
}
.stream-pill.latency {
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
}

.window-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.win-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.win-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.win-close:hover {
    background: #ef4444;
    color: #fff;
}

.window-body {
    flex: 1;
    overflow: auto;
    position: relative;
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.25) 50%);
    border-bottom-right-radius: var(--radius-md);
    z-index: 10;
}

/* --------------------------------------------------------------------------
   5. PHONE MIRROR DISPLAY VIEWPORT & PLACEHOLDER
   -------------------------------------------------------------------------- */
.stream-container {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #000;
}

.canvas-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050811;
    overflow: hidden;
}

#screenCanvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
}

.stream-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 22, 0.94);
    padding: 30px;
    text-align: center;
}

.placeholder-card {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dex-hero-badge {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-glow));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

.placeholder-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}
.placeholder-card .subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.connection-action-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
}

.connect-action-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}
.connect-action-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.action-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.action-icon-box.usb { background: rgba(56, 189, 248, 0.15); color: var(--accent-glow); }
.action-icon-box.wifi { background: rgba(16, 185, 129, 0.15); color: #34d399; }

.action-info h4 { font-size: 14px; margin-bottom: 2px; }
.action-info p { font-size: 11px; color: var(--text-secondary); }
.action-arrow { margin-left: auto; color: var(--text-muted); font-size: 12px; }

.btn-demo-large {
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-demo-large:hover {
    background: rgba(255, 255, 255, 0.16);
    color: var(--accent-glow);
}

/* ANDROID CONTROL TOOLBAR */
.android-control-bar {
    height: 44px;
    background: rgba(10, 15, 29, 0.95);
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 0 16px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctrl-btn {
    width: 34px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.ctrl-divider {
    width: 1px;
    height: 18px;
    background: var(--border-glass);
}

/* --------------------------------------------------------------------------
   6. THEME & WALLPAPER CUSTOMIZER WINDOW
   -------------------------------------------------------------------------- */
.theme-customizer-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.theme-section h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--accent-glow);
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.theme-cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.theme-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.theme-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}
.theme-card.active {
    border-color: var(--accent-glow);
    background: rgba(56, 189, 248, 0.1);
}

.theme-preview-box {
    width: 100%;
    height: 36px;
    border-radius: 6px;
    margin-bottom: 8px;
}
.samsung-grad { background: linear-gradient(135deg, #070b16, #2563eb, #38bdf8); }
.cyber-grad { background: linear-gradient(135deg, #0c0217, #ec4899, #06b6d4); }
.obsidian-grad { background: linear-gradient(135deg, #000000, #059669, #10b981); }
.sunset-grad { background: linear-gradient(135deg, #0c0817, #f59e0b, #f43f5e); }
.frost-grad { background: linear-gradient(135deg, #0f141f, #60a5fa, #93c5fd); }

.theme-card span {
    font-size: 11px;
    font-weight: 600;
}

.accent-picker-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}
#accentColorPicker {
    -webkit-appearance: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}
#accentColorPicker::-webkit-color-swatch {
    border: 1px solid var(--border-glass);
    border-radius: 8px;
}

/* Wallpapers Grid */
.wallpapers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.wp-card {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}
.wp-card:hover {
    transform: scale(1.03);
    border-color: var(--text-primary);
}
.wp-card.active {
    border-color: var(--accent-glow);
    box-shadow: 0 0 12px var(--border-glow);
}
.wp-card img {
    width: 100%;
    height: 65px;
    object-fit: cover;
}
.wp-card span {
    font-size: 10px;
    padding: 4px;
    background: rgba(10, 15, 29, 0.9);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   7. CONNECTION HUB & SETTINGS STYLES
   -------------------------------------------------------------------------- */
.dex-tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(10, 15, 29, 0.6);
    padding: 0 14px;
}
.dex-tab {
    padding: 12px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dex-tab.active {
    color: var(--accent-glow);
    border-bottom-color: var(--accent-glow);
}
.dex-tabs-body { padding: 20px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.connect-feature-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}
.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.usb-glow { background: rgba(56, 189, 248, 0.15); color: var(--accent-glow); }
.wifi-glow { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.feature-text h3 { font-size: 14px; margin-bottom: 4px; }
.feature-text p { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

.usb-connect-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}
.prompt-status-box { font-size: 13px; color: var(--text-secondary); }
.btn-group-centered { display: flex; gap: 14px; }

.btn {
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-glow));
    color: #fff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-1px);
}
.btn-hero { padding: 12px 28px; font-size: 14px; }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid var(--border-glass); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.18); }
.btn-outline { background: transparent; border: 1px solid var(--border-glass); color: var(--text-secondary); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 11px; }

.device-status-badge-card {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 16px;
}
.badge-header { font-size: 13px; color: #34d399; margin-bottom: 10px; }
.device-meta-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}
.device-meta-rows b { color: var(--text-primary); }

.dex-input, .dex-select {
    width: 100%;
    padding: 9px 12px;
    background: rgba(10, 15, 29, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    outline: none;
}
.input-with-button { display: flex; gap: 10px; }

.bridge-instruction-box {
    margin-top: 20px;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    font-size: 12px;
    color: #fbbf24;
}
.bridge-instruction-box code {
    display: block;
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    font-family: var(--font-mono);
    color: #38bdf8;
}

.prereq-list { display: flex; flex-direction: column; gap: 12px; }
.prereq-step { display: flex; gap: 12px; }
.step-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.prereq-step p { font-size: 12px; color: var(--text-secondary); }

/* TERMINAL */
.terminal-wrapper {
    display: flex;
    flex-direction: column;
    background: #070a12;
    font-family: var(--font-mono);
    padding: 12px;
}
.term-chips-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 10px;
}
.term-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: var(--font-mono);
    cursor: pointer;
}
.term-chip:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-glow);
}
.term-screen {
    flex: 1;
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.6;
    color: #38bdf8;
    white-space: pre-wrap;
    word-break: break-all;
}
.term-msg-sys { color: var(--text-muted); }
.term-msg-user { color: #fbbf24; }
.term-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-glass);
}
.term-prompt { color: #10b981; font-weight: 700; font-size: 13px; }
.term-command-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
}

/* SETTINGS & SWITCHES */
.settings-wrapper { padding: 20px; }
.setting-block { margin-bottom: 24px; }
.setting-block h4 {
    font-size: 13px;
    color: var(--accent-glow);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.setting-switch-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.setting-switch-item b { font-size: 13px; display: block; }
.setting-switch-item p { font-size: 11px; color: var(--text-secondary); }

.switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; inset: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: .3s; border-radius: 20px;
}
.slider:before {
    position: absolute; content: ""; height: 16px; width: 16px;
    left: 3px; bottom: 3px; background-color: white;
    transition: .3s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--accent-primary); }
input:checked + .slider:before { transform: translateX(18px); }

/* FILES */
.files-container { display: flex; flex-direction: column; }
.files-address-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(10, 15, 29, 0.6);
    border-bottom: 1px solid var(--border-glass);
}
.addr-btn {
    width: 28px; height: 28px; border-radius: 4px; border: none;
    background: rgba(255, 255, 255, 0.08); color: #fff; cursor: pointer;
}
.addr-input {
    flex: 1; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-glass);
    color: #fff; padding: 4px 10px; border-radius: 4px; font-family: var(--font-mono); font-size: 12px;
}
.files-grid-view {
    flex: 1; padding: 16px; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 16px;
}
.file-card {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 6px; border-radius: 6px; cursor: pointer; text-align: center;
}
.file-card:hover { background: rgba(255, 255, 255, 0.08); }
.file-card i { font-size: 32px; margin-bottom: 6px; }
.file-card span { font-size: 11px; }

/* GUIDE */
.guide-wrapper { padding: 24px; line-height: 1.6; }
.guide-card { margin-bottom: 24px; }
.guide-card h3 { font-size: 15px; margin-bottom: 10px; color: var(--accent-glow); }
.guide-card ol { padding-left: 20px; font-size: 13px; color: var(--text-secondary); }
.guide-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.guide-card code { background: rgba(255, 255, 255, 0.1); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); color: #38bdf8; }

/* --------------------------------------------------------------------------
   8. SAMSUNG DEX APP DRAWER MODAL
   -------------------------------------------------------------------------- */
.dex-app-drawer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}
.dex-app-drawer.open { display: flex; }
.app-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.app-drawer-modal {
    position: relative;
    width: 680px;
    max-height: 80vh;
    background: var(--bg-surface);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
    padding: 24px;
    display: flex;
    flex-direction: column;
    animation: drawerPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes drawerPop {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.drawer-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 20px;
}
.drawer-search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.drawer-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.recent-apps-row {
    display: flex;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}
.quick-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.quick-app:hover { transform: translateY(-3px); }
.app-sq {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    margin-bottom: 6px;
}
.app-sq.phone { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.app-sq.connect { background: linear-gradient(135deg, #059669, #34d399); }
.app-sq.theme { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.app-sq.terminal { background: linear-gradient(135deg, #d97706, #fbbf24); }
.app-sq.files { background: linear-gradient(135deg, #ea580c, #fb923c); }
.app-sq.settings { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.quick-app span { font-size: 11px; color: var(--text-secondary); }

.drawer-apps-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    padding-right: 4px;
}
.drawer-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}
.drawer-app-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}
.drawer-app-item .app-sq { width: 48px; height: 48px; font-size: 20px; }
.drawer-app-item span { font-size: 11px; }

/* --------------------------------------------------------------------------
   9. SAMSUNG ONE UI QUICK SETTINGS PANEL
   -------------------------------------------------------------------------- */
.quick-settings-panel {
    position: fixed;
    bottom: calc(var(--taskbar-height) + 12px);
    right: 12px;
    width: 320px;
    background: var(--bg-surface);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    padding: 18px;
    display: none;
    flex-direction: column;
    gap: 16px;
    z-index: 2500;
    animation: qsSlideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.quick-settings-panel.open { display: flex; }
@keyframes qsSlideUp {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.qs-header { display: flex; justify-content: space-between; align-items: center; }
.qs-header h4 { font-size: 14px; font-weight: 700; }
.qs-device-name { font-size: 11px; color: var(--accent-glow); font-weight: 600; }

.qs-toggles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.qs-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}
.qs-toggle i { font-size: 16px; }
.qs-toggle:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.qs-toggle.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.qs-slider-group { display: flex; flex-direction: column; gap: 10px; }
.slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}
.qs-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}
.qs-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-glow);
    cursor: pointer;
}

.qs-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-glass);
}

/* --------------------------------------------------------------------------
   10. SAMSUNG DEX SIGNATURE BOTTOM TASKBAR
   -------------------------------------------------------------------------- */
.dex-taskbar {
    height: var(--taskbar-height);
    background: var(--taskbar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    z-index: 1000;
}

/* LEFT: APP DRAWER & 3-BUTTON NAV */
.taskbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dex-apps-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dex-apps-btn:hover {
    background: var(--accent-primary);
    box-shadow: 0 0 14px var(--border-glow);
}

/* Samsung One UI 3-Button Nav Cluster */
.dex-nav-cluster {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 2px 4px;
}

.dex-nav-key {
    width: 34px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.dex-nav-key:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.dex-nav-key:active { transform: scale(0.9); }

/* CENTER: RUNNING APPS */
.taskbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 16px;
    overflow-x: auto;
}

.dex-task-tab {
    position: relative;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.dex-task-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.dex-task-tab.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--border-glow);
    color: var(--accent-glow);
}
.dex-task-tab.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent-glow);
    box-shadow: 0 0 6px var(--accent-glow);
}

/* RIGHT: SYSTEM TRAY */
.taskbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tray-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.tray-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tray-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}
.tray-status-pill:hover {
    background: rgba(255, 255, 255, 0.12);
}

.battery-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
}

.tray-clock-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 2px 8px;
    border-radius: 6px;
    cursor: pointer;
}
.tray-clock-box:hover {
    background: rgba(255, 255, 255, 0.08);
}
.clock-time { font-size: 12px; font-weight: 700; line-height: 1.1; }
.clock-date { font-size: 10px; color: var(--text-muted); }

.tray-notif-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}
.tray-notif-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.notif-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
}

.show-desktop-strip {
    width: 6px;
    height: 28px;
    border-left: 1px solid var(--border-glass);
    margin-left: 4px;
    cursor: pointer;
}
.show-desktop-strip:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   11. RESPONSIVENESS
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .desktop-icons-grid { display: none; }
    .theme-cards-grid { grid-template-columns: repeat(3, 1fr); }
    .dex-window { width: 95% !important; left: 2.5% !important; }
}
