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

:root {
    /* Cloudscape palette */
    --bg:           #f2f3f3;
    --surface:      #ffffff;
    --card:         #ffffff;
    --border:       #c6cace;
    --border-light: #e9ebed;
    --nav-bg:       #161d26;
    --blue:         #0972d3;
    --blue-hover:   #033160;
    --blue-dim:     rgba(9, 114, 211, 0.1);
    --text:         #000716;
    --muted:        #5f6b7a;
    --muted2:       #9ba7b6;
    --gold:         #f89256;
    --success:      #037f0c;
    --error:        #d91515;
    --radius:       8px;
    --radius-sm:    4px;
    --focus-ring:   0 0 0 2px #ffffff, 0 0 0 4px #0972d3;
}

body {
    font-family: 'Amazon Ember', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c6cace; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ba7b6; }

/* ─── Navigation Bar ─────────────────────────────────────── */
.navbar {
    background: var(--nav-bg);
    border-bottom: none;
    padding: 0 48px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    height: 56px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.navbar.scrolled {
    background: var(--nav-bg);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo .logo-text {
    color: #ffffff;
}

.logo::before {
    content: '';
    display: inline-block;
    width: 26px;
    height: 26px;
    background: var(--blue);
    border-radius: 4px;
    flex-shrink: 0;
}

.logo-text {
    color: var(--blue);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

#welcomeUser {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
}

.home-btn,
.logout-btn {
    padding: 6px 14px;
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.home-btn:hover,
.logout-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* ─── Main Container ─────────────────────────────────────── */
.container {
    padding: 80px 48px 64px;
}

/* ─── Toast ──────────────────────────────────────────────── */
.toast {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--nav-bg);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 400;
    z-index: 2000;
    white-space: nowrap;
    pointer-events: none;
    animation: toastIn 0.2s ease, toastOut 0.3s ease 3.1s forwards;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

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

/* ─── Modal Backdrop ─────────────────────────────────────── */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 7, 22, 0.5);
    align-items: center;
    justify-content: center;
}

/* ─── Modal Card ─────────────────────────────────────────── */
.modal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,7,22,0.15), 0 16px 48px rgba(0,7,22,0.08);
}

.modal-content h2 {
    margin-bottom: 6px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}

.modal-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Inputs */
.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.modal-content input::placeholder,
.modal-content textarea::placeholder {
    color: var(--muted2);
}

.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.25);
}

.modal-content select {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.modal-content textarea {
    resize: vertical;
    min-height: 80px;
}

.primary-btn {
    width: 100%;
    padding: 8px 16px;
    background: var(--blue);
    color: white;
    border: 1px solid var(--blue);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s, border-color 0.15s;
}

.primary-btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.primary-btn:active { background: var(--blue-hover); }

.error-message {
    color: var(--error);
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
}

.profile-modal-content { position: relative; }

.close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
}

.close-btn:hover {
    color: var(--text);
    background: var(--border-light);
}

/* ─── Admin Nav Button ───────────────────────────────────── */
.admin-nav-btn {
    padding: 6px 14px;
    background: transparent;
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s, border-color 0.15s;
}
.admin-nav-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* ─── Admin Panel ────────────────────────────────────────── */
#adminView {
    max-width: 900px;
    margin: 0 auto;
}

.admin-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 36px;
    box-shadow: 0 1px 4px rgba(0,7,22,0.06);
}

.admin-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text);
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.admin-tab {
    padding: 10px 20px;
    background: transparent;
    color: var(--muted);
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.admin-tab:hover { color: var(--text); }
.admin-tab.active {
    color: var(--blue);
    font-weight: 700;
    border-bottom-color: var(--blue);
}

/* Form grid */
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-field-full {
    grid-column: 1 / -1;
}

.admin-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.admin-hint {
    font-weight: 400;
    color: var(--muted);
    font-size: 12px;
}

.admin-field input,
.admin-field textarea,
.admin-field select,
.admin-select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    padding: 8px 10px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus,
.admin-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.25);
}

.admin-field input::placeholder,
.admin-field textarea::placeholder { color: var(--muted2); }

.admin-field textarea { resize: vertical; min-height: 80px; }
.admin-field select { cursor: pointer; }

/* Multi-select dropdown */
.multi-select-wrap { position: relative; user-select: none; }

.multi-select-trigger {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    padding: 7px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    gap: 6px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.multi-select-trigger.open {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.25);
}

.ms-selected-items { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.ms-placeholder { color: var(--muted2); }
.ms-chevron { color: var(--muted); font-size: 12px; flex-shrink: 0; }

.ms-tag {
    background: var(--blue-dim);
    color: var(--blue);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    white-space: nowrap;
}

.multi-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0; right: 0;
    z-index: 200;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}

.multi-select-panel.open { display: block; }

.multi-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.1s;
}

.multi-option:hover { background: var(--blue-dim); }

.multi-option input[type="checkbox"] {
    width: 14px; height: 14px;
    accent-color: var(--blue);
    cursor: pointer; flex-shrink: 0;
}

/* Select row */
.admin-select-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 24px;
}

.admin-select-row label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.admin-select {
    max-width: 420px;
    background: var(--surface);
}

/* Form footer */
.admin-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.admin-status {
    font-size: 13px;
    min-height: 20px;
}

.admin-status-ok  { color: var(--success); }
.admin-status-err { color: var(--error); }

.admin-submit-btn {
    padding: 8px 20px;
    background: var(--blue);
    color: #fff;
    border: 1px solid var(--blue);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}

.admin-submit-btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }

/* ─── Show Demo Button ───────────────────────────────────── */
.show-demo-bar {
    margin-bottom: 24px;
}

.show-demo-btn {
    padding: 8px 20px;
    background: var(--blue);
    color: #fff;
    border: 1px solid var(--blue);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.show-demo-btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }

/* ─── Search ─────────────────────────────────────────────── */
.search-container {
    margin-bottom: 32px;
}

.search-input {
    width: 100%;
    max-width: 560px;
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(9, 114, 211, 0.25);
}

.search-input::placeholder { color: var(--muted2); }

.catalog-heading {
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    margin-bottom: 8px;
    min-height: 20px;
}

.no-results {
    color: var(--muted);
    font-size: 14px;
    padding: 40px 0;
}

/* ─── Demo Sections ──────────────────────────────────────── */
.demo-section {
    margin-bottom: 0;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border-light);
}

.demo-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.demo-section + .demo-section {
    padding-top: 36px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--blue);
    border-radius: 2px;
    flex-shrink: 0;
}

/* ─── Demo Row ───────────────────────────────────────────── */
.demo-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    scrollbar-width: thin;
    scrollbar-color: #c6cace transparent;
    scroll-snap-type: x mandatory;
}

/* ─── Demo Cards ─────────────────────────────────────────── */
.demo-card {
    flex: 0 0 280px;
    width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    box-shadow: 0 1px 3px rgba(0,7,22,0.06);
}

.demo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,7,22,0.12), 0 0 0 1px var(--blue);
    border-color: var(--blue);
    z-index: 10;
}

/* Thumbnail */
.demo-thumbnail {
    height: 160px;
    background: linear-gradient(135deg, #0972d3 0%, #033160 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.demo-card:nth-child(2n) .demo-thumbnail { background: linear-gradient(135deg, #7d2ef7 0%, #4a1e9e 100%); }
.demo-card:nth-child(3n) .demo-thumbnail { background: linear-gradient(135deg, #0d7d69 0%, #065247 100%); }
.demo-card:nth-child(4n) .demo-thumbnail { background: linear-gradient(135deg, #c7511f 0%, #8b3716 100%); }
.demo-card:nth-child(5n) .demo-thumbnail { background: linear-gradient(135deg, #0972d3 0%, #7d2ef7 100%); }

.demo-icon {
    font-size: 56px;
    opacity: 0.92;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.card-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.card-rating {
    position: absolute;
    bottom: 8px;
    right: 10px;
    background: rgba(0,7,22,0.65);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-stars { color: var(--gold); font-size: 10px; }

/* Card body */
.demo-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.demo-info h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.demo-info p {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.55;
    flex: 1;
}

/* Service badges */
.card-services {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.service-badge {
    padding: 2px 8px;
    background: rgba(9, 114, 211, 0.08);
    color: var(--blue);
    border: 1px solid rgba(9, 114, 211, 0.3);
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.service-tag {
    background: rgba(9, 114, 211, 0.08);
    color: var(--blue);
    border: 1px solid rgba(9, 114, 211, 0.3);
}

/* Card footer — pinned to bottom */
.card-footer { margin-top: auto; }

.card-launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--blue);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    border: 1px solid var(--blue);
}

.card-launch-btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }

.card-launch-disabled {
    background: var(--bg);
    color: var(--muted2);
    cursor: default;
    border: 1px solid var(--border);
}

.card-launch-disabled:hover { background: var(--bg); border-color: var(--border); }

/* ─── Detail Page ────────────────────────────────────────── */
.detail-container {
    padding: 80px 48px 64px;
    max-width: 900px;
    margin: 0 auto;
}

#detailView {
    max-width: 900px;
    margin: 0 auto;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: transparent;
    color: var(--blue);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    margin-bottom: 24px;
    transition: background 0.15s, border-color 0.15s;
}

.back-btn:hover {
    background: var(--blue-dim);
    border-color: var(--blue);
}

.detail-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: 0 1px 4px rgba(0,7,22,0.06);
}

.detail-header {
    display: flex;
    gap: 28px;
    margin-bottom: 36px;
    align-items: flex-start;
}

.detail-icon {
    font-size: 72px;
    min-width: 120px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #0972d3 0%, #033160 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.detail-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.detail-title-section h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.25;
    color: var(--text);
}

.demo-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.demo-meta strong { color: var(--text); font-weight: 700; }

.stars { color: var(--gold); margin-left: 6px; }

/* Detail body sections */
.detail-body h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.detail-body p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 28px;
}

.demo-features { margin-bottom: 28px; }

.demo-features h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.demo-features ul { list-style: none; padding-left: 0; }

.demo-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--muted);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.demo-features li:last-child { border-bottom: none; }

.demo-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 700;
    font-size: 13px;
    margin-top: 1px;
    flex-shrink: 0;
}

.demo-tech { margin-bottom: 28px; }

.demo-tech h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    padding: 4px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 2px;
    font-size: 13px;
    font-weight: 400;
    color: var(--muted);
    transition: border-color 0.15s, color 0.15s;
}

.tech-tag:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.launch-section {
    text-align: center;
    padding-top: 28px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.launch-btn {
    padding: 10px 40px;
    background: var(--blue);
    color: white;
    border: 1px solid var(--blue);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.launch-btn:hover { background: var(--blue-hover); border-color: var(--blue-hover); }

.launch-note {
    margin-top: 12px;
    color: var(--muted2);
    font-size: 13px;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar  { padding: 0 20px; }
    .container { padding: 72px 20px 32px; }
    .detail-container { padding: 72px 20px 32px; }

    .detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-icon { min-width: 120px; height: 120px; font-size: 64px; }
    .demo-card   { min-width: 250px; max-width: 250px; }
}

/* ═══════════════════════════════════════════════════════════
   Theme Toggle Switch
   ═══════════════════════════════════════════════════════════ */
.theme-switch-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
}

.theme-switch-label {
    font-size: 14px;
    user-select: none;
    opacity: 0.7;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-switch-slider {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 22px;
    transition: background 0.25s;
}

.theme-switch-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.theme-switch input:checked + .theme-switch-slider {
    background: #e50914;
}

.theme-switch input:checked + .theme-switch-slider::before {
    transform: translateX(18px);
}

/* ═══════════════════════════════════════════════════════════
   Netflix Theme Overrides  (applied when data-theme="netflix"
   is set on <html>)
   ═══════════════════════════════════════════════════════════ */
[data-theme="netflix"] {
    --bg:           #0a0a0a;
    --surface:      #141414;
    --card:         #181818;
    --border:       rgba(255, 255, 255, 0.07);
    --border-light: rgba(255, 255, 255, 0.05);
    --blue:         #e50914;
    --blue-hover:   #f40612;
    --blue-dim:     rgba(229, 9, 20, 0.1);
    --text:         #f0f0f0;
    --muted:        #888888;
    --muted2:       #555555;
    --gold:         #fbbf24;
    --success:      #34d399;
    --error:        #f87171;
    --radius:       12px;
    --radius-sm:    6px;
}

/* Navbar */
[data-theme="netflix"] .navbar {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: none;
}
[data-theme="netflix"] .navbar.scrolled { background: rgba(10,10,10,0.97); }

/* Logo */
[data-theme="netflix"] .logo .logo-text { color: #e50914; }
[data-theme="netflix"] .logo::before {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #e50914;
    box-shadow: 0 0 10px #e50914;
}

/* Nav buttons */
[data-theme="netflix"] .home-btn,
[data-theme="netflix"] .logout-btn,
[data-theme="netflix"] .admin-nav-btn {
    color: #f0f0f0;
    border-color: rgba(255,255,255,0.18);
    background: transparent;
}
[data-theme="netflix"] .home-btn:hover,
[data-theme="netflix"] .logout-btn:hover,
[data-theme="netflix"] .admin-nav-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.35);
}
[data-theme="netflix"] #welcomeUser { color: #888; }

/* Modals */
[data-theme="netflix"] .modal-content {
    background: #161616;
    border-color: rgba(255,255,255,0.07);
    box-shadow: 0 32px 80px rgba(0,0,0,0.7);
}
[data-theme="netflix"] .modal-content input,
[data-theme="netflix"] .modal-content textarea {
    background: #1e1e1e;
    border-color: rgba(255,255,255,0.1);
    color: #f0f0f0;
}
[data-theme="netflix"] .modal-content input:focus,
[data-theme="netflix"] .modal-content textarea:focus,
[data-theme="netflix"] .modal-content select:focus {
    border-color: rgba(229,9,20,0.6);
    background: #222;
    box-shadow: none;
}

[data-theme="netflix"] .modal-content select {
    background: #1e1e1e;
    border-color: rgba(255,255,255,0.1);
    color: #f0f0f0;
}

/* Back button */
[data-theme="netflix"] .back-btn { color: #888; border-color: rgba(255,255,255,0.07); }
[data-theme="netflix"] .back-btn:hover {
    color: #f0f0f0;
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.05);
}

/* Cards */
[data-theme="netflix"] .demo-card { box-shadow: none; }
[data-theme="netflix"] .demo-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(229,9,20,0.25);
    border-color: rgba(229,9,20,0.25);
}

/* Thumbnail gradients */
[data-theme="netflix"] .demo-thumbnail                            { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); }
[data-theme="netflix"] .demo-card:nth-child(2n) .demo-thumbnail  { background: linear-gradient(135deg,#f093fb 0%,#f5576c 100%); }
[data-theme="netflix"] .demo-card:nth-child(3n) .demo-thumbnail  { background: linear-gradient(135deg,#4facfe 0%,#00f2fe 100%); }
[data-theme="netflix"] .demo-card:nth-child(4n) .demo-thumbnail  { background: linear-gradient(135deg,#43e97b 0%,#38f9d7 100%); }
[data-theme="netflix"] .demo-card:nth-child(5n) .demo-thumbnail  { background: linear-gradient(135deg,#fa709a 0%,#fee140 100%); }

/* Badges */
[data-theme="netflix"] .service-badge,
[data-theme="netflix"] .service-tag {
    background: rgba(99,155,235,0.12);
    color: #7eb8f7;
    border-color: rgba(99,155,235,0.2);
    border-radius: 99px;
}

/* Disabled launch btn */
[data-theme="netflix"] .card-launch-disabled { background: #222; border-color: rgba(255,255,255,0.07); }
[data-theme="netflix"] .card-launch-disabled:hover { background: #222; border-color: rgba(255,255,255,0.07); }

/* Search */
[data-theme="netflix"] .search-input {
    background: #181818;
    border-color: rgba(255,255,255,0.1);
    color: #f0f0f0;
    border-radius: 99px;
}
[data-theme="netflix"] .search-input:focus {
    border-color: rgba(229,9,20,0.5);
    background: #1e1e1e;
    box-shadow: 0 0 0 3px rgba(229,9,20,0.08);
}

/* Detail */
[data-theme="netflix"] .detail-content {
    background: #181818;
    border-color: rgba(255,255,255,0.07);
    box-shadow: none;
    border-radius: 16px;
}
[data-theme="netflix"] .detail-icon { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); border-radius: 16px; }
[data-theme="netflix"] .detail-body h2 { border-bottom: none; padding-bottom: 0; }
[data-theme="netflix"] .detail-body p { color: #b0b0b0; }
[data-theme="netflix"] .demo-features li { color: #b0b0b0; border-bottom-color: rgba(255,255,255,0.05); }
[data-theme="netflix"] .tech-tag { background: #1e1e1e; border-color: rgba(255,255,255,0.07); border-radius: 99px; }
[data-theme="netflix"] .tech-tag:hover { border-color: rgba(255,255,255,0.2); color: #f0f0f0; }

/* Toast */
[data-theme="netflix"] .toast { background: #1e1e1e; border-color: rgba(255,255,255,0.07); color: #f0f0f0; }

/* Admin */
[data-theme="netflix"] .admin-panel { background: #181818; border-color: rgba(255,255,255,0.07); box-shadow: none; }
[data-theme="netflix"] .admin-tabs  { border-bottom-color: rgba(255,255,255,0.07); }
[data-theme="netflix"] .admin-tab.active { color: #f0f0f0; border-bottom-color: #e50914; }
[data-theme="netflix"] .admin-form-footer { border-top-color: rgba(255,255,255,0.05); }
[data-theme="netflix"] .admin-field input,
[data-theme="netflix"] .admin-field textarea,
[data-theme="netflix"] .admin-select { background: #1e1e1e; border-color: rgba(255,255,255,0.1); color: #f0f0f0; }
[data-theme="netflix"] .admin-field input:focus,
[data-theme="netflix"] .admin-field textarea:focus,
[data-theme="netflix"] .admin-field select:focus,
[data-theme="netflix"] .admin-select:focus { border-color: rgba(229,9,20,0.5); background: #222; box-shadow: none; }
[data-theme="netflix"] .admin-field select { background: #1e1e1e; border-color: rgba(255,255,255,0.1); color: #f0f0f0; }
[data-theme="netflix"] .multi-select-trigger { background: #1e1e1e; border-color: rgba(255,255,255,0.1); }
[data-theme="netflix"] .multi-select-trigger.open { border-color: rgba(229,9,20,0.5); box-shadow: none; }
[data-theme="netflix"] .multi-select-panel { background: #1e1e1e; border-color: rgba(255,255,255,0.1); }
[data-theme="netflix"] .multi-option { color: #f0f0f0; }
[data-theme="netflix"] .multi-option:hover { background: rgba(229,9,20,0.1); }
[data-theme="netflix"] .ms-tag { background: rgba(229,9,20,0.2); color: #e50914; }
