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

:root {
    --bg-primary: #0f0d1e;
    --bg-secondary: #1a1535;
    --bg-tertiary: #13102a;
    --border-color: rgba(139, 92, 246, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a8a8b8;
    --accent-primary: #8b5cf6;
    --accent-secondary: #3b82f6;
    --accent-tertiary: #fbbf24;
    --hover-bg: rgba(139, 92, 246, 0.08);
    --card-bg: rgba(26, 21, 53, 0.6);
    --card-hover: rgba(139, 92, 246, 0.12);
}

:root[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8e8ea;
    --border-color: rgba(0, 0, 0, 0.1);
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --accent-primary: #8b5cf6;
    --accent-secondary: #3b82f6;
    --accent-tertiary: #fbbf24;
    --hover-bg: rgba(139, 92, 246, 0.06);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-hover: rgba(139, 92, 246, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.logo-icon-img {
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 4px 12px rgba(139, 92, 246, 0.3));
    transition: transform 0.3s ease;
}

.logo-icon-img:hover {
    transform: scale(1.05);
}

.logo-text h1 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.logo-text .version {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.logo-text .consultant {
    font-size: 10px;
    color: rgba(139, 92, 246, 0.8);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.uncheck-btn, .sidebar-actions button, .nav-item {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.uncheck-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.uncheck-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-actions {
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.sidebar-actions button {
    flex: 1;
    padding: 8px;
    background: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background-color: var(--bg-primary);
}

.page-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.expandable-section {
    background: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.expandable-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.expandable-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.expandable-header-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.option-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.option-card:hover {
    background: var(--card-hover);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.sub-option {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 0 20px 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.sub-option:last-child {
    margin-bottom: 20px;
}

.sub-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.option-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.option-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.option-text h3 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.option-text p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 35px;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #4b5563;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle.on {
    background: var(--accent-primary);
}

.toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: left 0.2s;
}

.toggle.on .toggle-knob {
    left: 22px;
}

.chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
    color: var(--text-secondary);
}

.chevron.expanded {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.expandable-content.open {
    max-height: 5000px;
}

.script-box {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    position: relative;
}

.script-dots {
    position: absolute;
    top: 12px;
    left: 20px;
    display: flex;
    gap: 6px;
}

.script-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4b5563;
}

.script-box pre {
    margin: 30px 0 0 0;
    border-radius: 4px;
    overflow-x: auto;
}

.script-box pre code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.btn-action {
    padding: 16px 24px;
    background: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-action-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-action-label {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 13px;
}

.preset-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 0 20px 8px 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.preset-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.preset-card h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.preset-card p {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
}

.preset-info {
    padding: 16px 20px;
    margin: 0 20px 12px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.preset-info strong {
    color: var(--text-primary);
    display: block;
    margin-top: 8px;
}

.package-manager-selector {
    padding: 8px 32px 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 24 24%27 fill=%27none%27 stroke=%27white%27 stroke-width=%272%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3e%3cpolyline points=%276 9 12 15 18 9%27%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-bottom: 12px;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.manual-package-input {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.manual-package-input input {
    flex: 1;
    padding: 12px 16px;
    background: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.manual-package-input button {
    padding: 12px 24px;
    background: var(--hover-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background 0.2s;
}

.manual-package-input button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.manual-packages-list {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.script-type-badge {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
}

.script-type-badge.powershell {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.script-type-badge.cmd {
    background: rgba(249, 115, 22, 0.2);
    border-color: rgba(249, 115, 22, 0.4);
    color: #fb923c;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: all;
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
}

.toast.removing {
    animation: slideOut 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.4);
}

.toast.success .toast-icon {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.4);
}

.toast.error .toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.toast.info {
    border-color: rgba(59, 130, 246, 0.4);
}

.toast.info .toast-icon {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.toast.warning {
    border-color: rgba(251, 191, 36, 0.4);
}

.toast.warning .toast-icon {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.toast-content {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.4;
}

.toast-close {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 18px;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before,
.tooltip::after {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10000;
}

.tooltip::before {
    content: attr(data-tooltip);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
}

.tooltip::after {
    content: '';
    border: 6px solid transparent;
    border-top-color: var(--bg-tertiary);
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip variants */
.tooltip-right::before {
    bottom: auto;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
}

.tooltip-right::after {
    bottom: auto;
    left: calc(100% + 2px);
    top: 50%;
    border: 6px solid transparent;
    border-right-color: var(--bg-tertiary);
    transform: translateY(-50%) translateX(-4px);
}

.tooltip-right:hover::before,
.tooltip-right:hover::after {
    transform: translateY(-50%) translateX(0);
}

/* Wizard/Step-by-step interface */
.wizard-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    position: relative;
}

.wizard-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -50%;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    top: 20px;
    z-index: 0;
}

.wizard-step.active:not(:last-child)::after,
.wizard-step.completed:not(:last-child)::after {
    background: var(--accent-primary);
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.wizard-step.active .wizard-step-number {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.wizard-step.completed .wizard-step-number {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.wizard-step.completed .wizard-step-number::before {
    content: '✓';
}

.wizard-step-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.wizard-step.active .wizard-step-label {
    color: var(--text-primary);
}

.wizard-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    min-height: 400px;
    backdrop-filter: blur(10px);
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.wizard-btn {
    padding: 12px 32px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.wizard-btn:hover:not(:disabled) {
    background: var(--card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard-btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.wizard-btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.category-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.category-card.selected {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
}

.category-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.apps-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.app-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.app-item:hover {
    background: var(--card-hover);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateX(4px);
}

.app-item.selected {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent-primary);
}

.app-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.app-item.selected .app-checkbox {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.app-item.selected .app-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.app-details h4 {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.app-details p {
    font-size: 13px;
    color: var(--text-secondary);
}

.summary-section {
    margin-top: 24px;
}

.summary-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.summary-item {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item-count {
    background: var(--accent-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

/* Profils Prédéfinis */
.sidebar-profiles {
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
}

.profiles-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.profile-btn {
    width: 100%;
    aspect-ratio: 1;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-btn:hover {
    background: var(--card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.profile-btn:active {
    transform: translateY(0);
}

/* Badge Danger pour options risquées */
.danger-badge {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: #f87171;
    margin-left: 6px;
}

/* Theme Toggle */
.theme-toggle {
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-toggle-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.theme-toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle-switch:hover {
    border-color: var(--accent-primary);
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.theme-toggle-slider::before {
    content: '🌙';
}

:root[data-theme="light"] .theme-toggle-slider {
    left: 27px;
}

:root[data-theme="light"] .theme-toggle-slider::before {
    content: '☀️';
}

/* ========================================
   RESPONSIVE DESIGN - Mobile & Tablet
   ======================================== */

/* Mobile Hamburger Menu */
.mobile-header {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

/* Tablet & Mobile (< 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        padding: clamp(16px, 4vw, 32px);
    }
    
    .page-title {
        font-size: clamp(20px, 5vw, 28px);
    }
    
    .option-card, .sub-option {
        padding: clamp(12px, 3vw, 20px);
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    /* Sidebar mobile - Hidden by default */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar.mobile-open {
        left: 0;
        visibility: visible;
        pointer-events: auto;
    }

    .sidebar:not(.mobile-open) {
        visibility: hidden;
        pointer-events: none;
    }
    
    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 999;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .main-content {
        flex: 1;
        padding: 16px;
        overflow-y: auto;
        height: auto;
    }
    
    .sidebar-header {
        padding: 16px 20px;
    }
    
    .logo-icon-img {
        width: 48px;
        height: 48px;
    }
    
    .logo-text h1 {
        font-size: 14px;
    }
    
    .logo-text .consultant {
        font-size: 9px;
    }
    
    .uncheck-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .sidebar-actions {
        padding: 8px 16px;
        gap: 6px;
    }
    
    .sidebar-actions button {
        font-size: 12px;
        padding: 6px;
    }
    
    .theme-toggle {
        padding: 8px 16px;
    }
    
    .theme-toggle-label {
        font-size: 12px;
    }
    
    .nav-item {
        padding: 10px 16px;
        font-size: 13px;
        gap: 10px;
    }
    
    .page-title {
        font-size: 22px;
        margin-bottom: 16px;
    }
    
    .option-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .option-content {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .option-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .option-text h3 {
        font-size: 14px;
    }
    
    .option-text p {
        font-size: 13px;
    }
    
    .toggle-wrapper {
        align-self: flex-end;
        width: 100%;
        justify-content: flex-end;
    }
    
    .sub-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
        margin: 0 12px 8px 12px;
    }
    
    .sub-option .toggle-wrapper {
        align-self: flex-end;
    }
    
    .script-box {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .script-box pre code {
        font-size: 11px;
    }
    
    .button-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .btn-action {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
    }
    
    .toast {
        min-width: auto;
        max-width: 100%;
    }
    
    .manual-package-input {
        flex-direction: column;
        gap: 8px;
    }
    
    .manual-package-input button {
        width: 100%;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    /* Category Grid Mobile */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .expandable-header {
        padding: 14px 16px;
    }
    
    .expandable-header-content {
        gap: 12px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .option-card {
        padding: 12px;
    }
    
    .option-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .option-text h3 {
        font-size: 13px;
    }
    
    .option-text p {
        font-size: 12px;
    }
    
    .nav-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .logo-icon-img {
        width: 40px;
        height: 40px;
    }
    
    .toast {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        overflow-y: auto;
    }
    
    .sidebar-nav {
        max-height: 50vh;
    }
}

/* Overlay for mobile menu */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-overlay.active {
        display: block;
    }
}

/* ========================================
   LIVE SCRIPT PANEL - Real-time Preview
   ======================================== */

.live-script-panel {
    width: 520px;
    min-width: 400px;
    max-width: 55vw;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s ease;
    position: relative;
    z-index: 50;
}

.live-script-panel.collapsed {
    transform: translateX(100%);
    position: absolute;
    right: 0;
}

/* Header */
.live-script-header {
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-script-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-script-title h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Live indicator animation */
.live-indicator {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* Stats badges */
.live-script-stats {
    display: flex;
    gap: 8px;
}

.stat-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-badge.options-count {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-primary);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.stat-badge.lines-count {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-secondary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-badge span {
    font-weight: 700;
    font-size: 13px;
}

/* Actions bar */
.live-script-actions {
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.btn-live-action {
    flex: 1;
    padding: 8px 12px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-live-action:hover {
    background: var(--card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.btn-live-action.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.btn-live-action.primary:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Script content */
.live-script-content {
    flex: 1;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(135deg, #0d0b1a 0%, #1a1333 100%);
}

#liveScriptPre {
    margin: 0;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    background: transparent !important;
    border-radius: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) transparent;
}

#liveScriptPre::-webkit-scrollbar {
    width: 8px;
}

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

#liveScriptPre::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

#liveScriptCode {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.7;
    background: transparent !important;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

/* ═══════════════════════════════════════════
   MERMAID-STYLE SYNTAX HIGHLIGHTING
   Couleurs vives sur fond sombre
   ═══════════════════════════════════════════ */

/* Override highlight.js with Mermaid-inspired colors */
#liveScriptCode.hljs {
    background: transparent !important;
    color: #e0e0e0;
}

/* Comments - Soft cyan */
#liveScriptCode .hljs-comment {
    color: #6ee7b7;
    font-style: italic;
}

/* Strings - Vibrant pink/magenta */
#liveScriptCode .hljs-string {
    color: #f472b6;
}

/* Numbers - Orange */
#liveScriptCode .hljs-number {
    color: #fb923c;
}

/* Keywords - Electric purple */
#liveScriptCode .hljs-keyword,
#liveScriptCode .hljs-selector-tag {
    color: #a78bfa;
    font-weight: 600;
}

/* Built-in functions - Bright cyan */
#liveScriptCode .hljs-built_in,
#liveScriptCode .hljs-function {
    color: #22d3ee;
}

/* Variables - Golden yellow */
#liveScriptCode .hljs-variable,
#liveScriptCode .hljs-template-variable {
    color: #fbbf24;
}

/* Types/Classes - Soft blue */
#liveScriptCode .hljs-type,
#liveScriptCode .hljs-class {
    color: #60a5fa;
}

/* Operators - White */
#liveScriptCode .hljs-operator {
    color: #f8fafc;
}

/* Parameters - Light purple */
#liveScriptCode .hljs-params {
    color: #c4b5fd;
}

/* Attributes - Teal */
#liveScriptCode .hljs-attr,
#liveScriptCode .hljs-attribute {
    color: #2dd4bf;
}

/* Script line animations - Enhanced */
.script-line {
    display: block;
    opacity: 0;
    transform: translateX(30px) scale(0.98);
    animation: slideInLine 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    padding: 1px 0;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.script-line:hover {
    background: rgba(139, 92, 246, 0.1);
}

/* Interactive lines - can be double-clicked to toggle */
.script-line.interactive {
    cursor: pointer;
    position: relative;
}

.script-line.interactive:hover {
    background: rgba(139, 92, 246, 0.2);
    border-left: 2px solid var(--accent-primary);
    padding-left: 6px;
    margin-left: -2px;
}

.script-line.interactive:hover::after {
    content: '🖱️ Double-clic pour désactiver';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    opacity: 0.8;
    pointer-events: none;
}

.script-line.interactive:active {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(0.99);
}

.script-line.new {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.25) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-left: 3px solid #22c55e;
    margin-left: -3px;
    padding-left: 8px;
    animation: slideInNew 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, glowPulse 1s ease-out;
}

.script-line.removed {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, transparent 100%);
    text-decoration: line-through;
    opacity: 0.4;
    animation: fadeOutLine 0.3s ease forwards;
}

@keyframes slideInLine {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.98);
    }
    60% {
        transform: translateX(-5px) scale(1.01);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInNew {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
        filter: brightness(1.5);
    }
    50% {
        filter: brightness(1.3);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: brightness(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(34, 197, 94, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    }
}

@keyframes fadeOutLine {
    to {
        opacity: 0;
        transform: translateX(-20px);
        height: 0;
        padding: 0;
        margin: 0;
    }
}

/* Staggered animation - smoother cascade */
.script-line:nth-child(1) { animation-delay: 0s; }
.script-line:nth-child(2) { animation-delay: 0.03s; }
.script-line:nth-child(3) { animation-delay: 0.06s; }
.script-line:nth-child(4) { animation-delay: 0.09s; }
.script-line:nth-child(5) { animation-delay: 0.12s; }
.script-line:nth-child(6) { animation-delay: 0.15s; }
.script-line:nth-child(7) { animation-delay: 0.18s; }
.script-line:nth-child(8) { animation-delay: 0.21s; }
.script-line:nth-child(9) { animation-delay: 0.24s; }
.script-line:nth-child(10) { animation-delay: 0.27s; }
.script-line:nth-child(n+11) { animation-delay: 0.3s; }

/* Footer hint */
.live-script-footer {
    padding: 10px 20px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-hint {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Toggle button for collapsed state */
.live-panel-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 100;
}

.live-panel-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.5);
}

.live-panel-toggle.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.toggle-count {
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
}

/* Resize handle */
.resize-handle {
    position: absolute;
    left: -6px;
    top: 0;
    width: 12px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
    letter-spacing: 2px;
    writing-mode: vertical-rl;
    z-index: 100;
    transition: all 0.2s;
}

.resize-handle:hover {
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    color: var(--accent-primary);
}

.resize-handle:active {
    background: var(--accent-primary);
    color: white;
}

/* Mode plein écran */
.live-script-panel.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    border: none !important;
}

.script-fullscreen .sidebar,
.script-fullscreen .main-content {
    display: none !important;
}

.live-script-panel.fullscreen .resize-handle {
    display: none;
}

/* Responsive - Tablet */
@media (max-width: 1200px) {
    .live-script-panel {
        width: 360px;
    }
}

/* Responsive - Mobile */
@media (max-width: 900px) {
    .live-script-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        height: 50vh;
        border-left: none;
        border-top: 1px solid var(--border-color);
        transform: translateY(100%);
        border-radius: 16px 16px 0 0;
        z-index: 200;
    }

    .live-script-panel.visible {
        transform: translateY(0);
    }

    .live-script-panel.collapsed {
        transform: translateY(100%);
    }

    .main-content {
        padding-bottom: 80px;
    }

    .live-panel-toggle {
        right: 16px;
        bottom: 16px;
    }
}

/* Number counter animation */
@keyframes countUp {
    from { transform: translateY(10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.count-animate {
    animation: countUp 0.3s ease;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RUN NOW BUTTON - Style "Danger" Premium
   ══════════════════════════════════════════════════════════════════════════════ */

.btn-live-action.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    font-weight: 700;
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-live-action.danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-live-action.danger:hover::before {
    left: 100%;
}

.btn-live-action.danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.6);
}

.btn-live-action.danger:active {
    transform: translateY(0);
}

#runNowBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FLOATING RUN NOW BUTTON - Apparaît quand 20+ options
   ══════════════════════════════════════════════════════════════════════════════ */

.run-now-floating {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(239, 68, 68, 0.5);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: floatBtn 3s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.run-now-floating:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 15px 50px rgba(239, 68, 68, 0.7);
}

.run-now-floating.hidden {
    display: none !important;
}

.run-now-floating i {
    font-size: 24px;
}

.floating-count {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
}

@keyframes floatBtn {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   LANGUAGE SELECTOR
   ══════════════════════════════════════════════════════════════════════════════ */

.language-selector {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 6px;
    z-index: 999;
    background: var(--bg-secondary);
    padding: 6px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.language-selector button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.language-selector button:hover {
    background: rgba(139, 92, 246, 0.2);
    color: var(--text-primary);
}

.language-selector button.active {
    background: var(--accent-primary);
    color: white;
}

/* ══════════════════════════════════════════════════════════════════════════════
   UI POLISH 2025 - Toggles, Cards, Scrollbar
   ══════════════════════════════════════════════════════════════════════════════ */

/* Scrollbar Violette Premium */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #c4b5fd, #a78bfa);
}

/* Toggle Switches Améliorés - compatible avec taille existante 44x24 */
/* Note: styles de base dans .toggle plus haut, ici juste améliorations */
.toggle {
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle.on {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    box-shadow: 0 0 15px rgba(167, 139, 250, 0.4);
}

.toggle-knob {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle.on .toggle-knob {
    background: linear-gradient(135deg, #ffffff, #f3f4f6);
    box-shadow: 0 2px 10px rgba(167, 139, 250, 0.5);
}

/* Option Cards Premium */
.option-card {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Ligne de survol en BAS (pas en haut) */
.option-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.option-card:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, 0.3);
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.12);
}

.option-card:hover::after {
    opacity: 1;
}

/* Empêcher troncature du texte */
.option-card .option-text h3 {
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
}

.option-card .option-text p {
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
}

/* Nav Items avec Phosphor Icons */
.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(167, 139, 250, 0.12);
    transform: translateX(4px);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(167, 139, 250, 0.25), transparent);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-primary);
    border-radius: 0 3px 3px 0;
}

/* JetBrains Mono pour le code */
#liveScriptCode,
.script-box code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
    font-size: 13px;
    line-height: 1.7;
}

/* Badge compteur premium */
.stat-badge {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(167, 139, 250, 0.2));
    border: 1px solid rgba(167, 139, 250, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Glow effect pour titre quand 100+ options */
.page-title.glow-active {
    animation: titleGlow 2s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: none; }
    50% { text-shadow: 0 0 30px rgba(167, 139, 250, 0.6); }
}

/* Danger badge pour options risquées */
.danger-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    animation: pulseDanger 2s infinite;
}

@keyframes pulseDanger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Script type badges améliorés */
.script-type-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.script-type-badge.powershell {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: white;
}

.script-type-badge.registry {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.script-type-badge.cmd {
    background: linear-gradient(135deg, #374151, #1f2937);
    color: white;
}

/* Responsive ajustements */
@media (max-width: 900px) {
    .language-selector {
        bottom: 70px;
        right: 10px;
    }

    .run-now-floating {
        bottom: 120px;
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PERFORMANCE CSS - Containment + will-change + GPU Acceleration
   ══════════════════════════════════════════════════════════════════════════════ */

/* CSS Containment pour performances */
.option-card,
.nav-item,
.expandable-section,
.sub-option {
    contain: layout style paint;
}

.main-content {
    contain: strict;
}

/* GPU Acceleration pour éléments animés */
.option-card,
.toggle,
.btn-live-action,
.run-now-floating {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════════
   DOUBLE-CLIC TOGGLE - Flash Animation
   ══════════════════════════════════════════════════════════════════════════════ */

.option-card {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

/* Flash vert quand on toggle via double-clic */
.option-card.toggle-flash {
    animation: toggleFlash 0.4s ease;
}

@keyframes toggleFlash {
    0%, 100% {
        background: rgba(30, 27, 46, 0.6);
        box-shadow: none;
    }
    50% {
        background: rgba(34, 197, 94, 0.25);
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    }
}

/* Flash rouge pour options dangereuses */
.option-card.danger-flash {
    animation: dangerFlash 0.4s ease;
}

@keyframes dangerFlash {
    0%, 100% {
        background: rgba(30, 27, 46, 0.6);
    }
    50% {
        background: rgba(239, 68, 68, 0.25);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    }
}

/* Sub-options aussi cliquables */
.sub-option {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.sub-option:hover {
    background: rgba(167, 139, 250, 0.08);
}

.sub-option.toggle-flash {
    animation: toggleFlash 0.4s ease;
}

/* ══════════════════════════════════════════════════════════════════════════════
   REDUCED MOTION - Accessibilité
   ══════════════════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .option-card,
    .toggle,
    .script-line,
    .run-now-floating {
        animation: none !important;
        transition: none !important;
    }

    .toggle-flash,
    .danger-flash {
        animation: none !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   KEYBOARD FOCUS STYLES
   ══════════════════════════════════════════════════════════════════════════════ */

.option-card:focus-visible,
.toggle:focus-visible,
.btn-live-action:focus-visible,
.nav-item:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   LOADING SKELETON (pour lazy loading futur)
   ══════════════════════════════════════════════════════════════════════════════ */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(167, 139, 250, 0.1) 25%,
        rgba(167, 139, 250, 0.2) 50%,
        rgba(167, 139, 250, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 80px;
    margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   BANNER MODAL
   ══════════════════════════════════════════════════════════════════════════════ */

.banner-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.banner-modal.show {
    display: flex;
}

.banner-modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.banner-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.banner-modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0;
}

.banner-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.banner-modal-close:hover {
    color: var(--text-primary);
}

.banner-modal-body {
    padding: 20px;
}

.banner-modal-body p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.banner-modal-body textarea {
    width: 100%;
    height: 150px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s;
}

.banner-modal-body textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.banner-modal-body textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.banner-modal-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.btn-modal {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-modal.secondary {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.btn-modal.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-modal.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-modal.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-modal.danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.btn-modal.danger:hover {
    background: rgba(239, 68, 68, 0.25);
}
