   /* ========================================
   BASE STYLES - Shared across all devices
   ======================================== 
   
   Z-INDEX HIERARCHY:
   99999 - Notifications & Toasts (always on top)
   10200 - Search overlay (above modals)
   10100 - Modal overlays
   9999  - Floating buttons/UI elements
   1000+ - Component-specific layers
   100   - Avatar container
   10    - Tabs and similar UI
   1     - Base content layers
   -1    - Background elements
   
   ======================================== */

/* CSS Variables for consistent theming and scaling */
:root {
    --primary-cyan: #00ffff;
    --primary-cyan-dark: #00cccc;
    --primary-cyan-light: #66ffff;
    --bg-dark: #1a1a1a;
    --bg-darker: #0d0d0d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --error-color: #ff6666;
    --success-color: #00ffaa;
    --warning-color: #ffa500;
    --border-radius: 8px;
    --border-radius-small: 4px;
    --border-radius-large: 12px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --shadow-light: 0 2px 8px rgba(0, 255, 255, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 255, 255, 0.2);
    --shadow-heavy: 0 8px 32px rgba(0, 255, 255, 0.3);
    --glow-light: 0 0 10px rgba(0, 255, 255, 0.3);
    --glow-medium: 0 0 20px rgba(0, 255, 255, 0.5);
    --glow-heavy: 0 0 30px rgba(0, 255, 255, 0.7);
    
    /* Responsive scaling variables - Enhanced for high resolution displays */
    --scale-factor: clamp(0.8, 1vw, 2.5);
    --font-scale: clamp(0.85, 0.5vw + 0.75rem, 2.0);
    --spacing-scale: clamp(0.75, 1.2vw, 3.0);
    --ui-scale: clamp(0.8, 1.5vw, 2.2);
    --avatar-scale: clamp(0.9, 1.8vw, 2.8);
    
    /* Dynamic scaling variables - Updated by JavaScript based on viewport */
    --current-avatar-scale: 1.0;
    --dynamic-ui-scale: 1.0;
    --effective-button-scale: 1.0;
    --effective-font-scale: 1.0;
    
    /* Base sizes that scale with viewport and dynamic factors - Moderate scaling */
    --base-font-size: clamp(14px, calc(1.2vw * var(--dynamic-ui-scale, 1)), 24px);
    --base-padding: clamp(8px, calc(1.0vw * var(--dynamic-ui-scale, 1)), 32px);
    --base-margin: clamp(4px, calc(0.8vw * var(--dynamic-ui-scale, 1)), 24px);
    --base-gap: clamp(6px, calc(1.0vw * var(--dynamic-ui-scale, 1)), 28px);
    
    /* Button scaling based on dynamic factors - Moderate for compatibility */
    --button-font-size: clamp(12px, calc(0.9rem * var(--dynamic-ui-scale, 1)), 20px);
    --button-padding-vertical: clamp(8px, calc(12px * var(--dynamic-ui-scale, 1)), 20px);
    --button-padding-horizontal: clamp(16px, calc(24px * var(--dynamic-ui-scale, 1)), 40px);
    --button-border-radius: clamp(4px, calc(8px * var(--dynamic-ui-scale, 1)), 12px);
    
    /* Form element scaling - Moderate for compatibility */
    --input-font-size: clamp(13px, calc(1rem * var(--dynamic-ui-scale, 1)), 20px);
    --input-padding: clamp(10px, calc(16px * var(--dynamic-ui-scale, 1)), 24px);
    --input-border-radius: clamp(4px, calc(8px * var(--dynamic-ui-scale, 1)), 12px);
    
    /* Container scaling - Moderate increase for high resolution displays */
    --header-height: clamp(60px, calc(8vh * var(--dynamic-ui-scale, 1)), 120px);
    --sidebar-width: clamp(280px, calc(25vw * var(--dynamic-ui-scale, 1)), 500px);
    --content-max-width: clamp(320px, 90vw, 2000px);
    
    /* Modal and card scaling - Moderate for large displays */
    --modal-padding: clamp(16px, calc(24px * var(--dynamic-ui-scale, 1)), 40px);
    --card-padding: clamp(12px, calc(20px * var(--dynamic-ui-scale, 1)), 32px);
    --card-border-radius: clamp(8px, calc(12px * var(--dynamic-ui-scale, 1)), 16px);
}

/* Global Resets */
*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #0d0d0d, #1a1a1a, #0d0d0d);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography - Enhanced Responsive Scaling */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 calc(var(--base-margin) * 2) 0;
    color: var(--primary-cyan);
    text-shadow: var(--glow-light);
}

h1 { font-size: clamp(1.8rem, 5vw + 0.5rem, 4.5rem); }
h2 { font-size: clamp(1.5rem, 4vw + 0.3rem, 3.8rem); }
h3 { font-size: clamp(1.3rem, 3vw + 0.2rem, 3.2rem); }
h4 { font-size: clamp(1.1rem, 2.5vw + 0.1rem, 2.6rem); }
h5 { font-size: clamp(1rem, 2vw, 2.2rem); }
h6 { font-size: clamp(0.9rem, 1.5vw, 1.8rem); }

p {
    margin: 0 0 1rem 0;
}

a {
    color: var(--primary-cyan);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-cyan-light);
    text-shadow: var(--glow-light);
}

/* Form Elements - Dynamic Scaling */
input, textarea, select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--input-border-radius);
    color: var(--text-primary);
    padding: var(--input-padding);
    font-size: var(--input-font-size);
    font-family: inherit;
    transition: var(--transition-normal);
    width: 100%;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

/* Fix dropdown option colors - white text on white background issue */
select {
    background: rgba(20, 20, 20, 0.9) !important;
    color: #ffffff !important;
}

select option {
    background: rgba(20, 20, 20, 0.95) !important;
    color: #ffffff !important;
    padding: 8px 12px !important;
    border: none !important;
}

select option:checked {
    background: rgba(0, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

select option:hover {
    background: rgba(0, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

/* Buttons - Dynamic Scaling */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: calc(0.5rem * var(--dynamic-ui-scale, 1));
    padding: var(--button-padding-vertical) var(--button-padding-horizontal);
    border: 1px solid var(--primary-cyan);
    border-radius: var(--button-border-radius);
    background: var(--primary-cyan);
    color: var(--bg-dark);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: var(--button-font-size);
    text-transform: uppercase;
    letter-spacing: calc(0.5px * var(--dynamic-ui-scale, 1));
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    background: var(--primary-cyan-dark);
    box-shadow: var(--glow-medium);
    transform: translateY(-1px);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Button Variants */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: var(--error-color);
    border-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #ff4444;
    box-shadow: 0 0 15px rgba(255, 102, 102, 0.5);
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: var(--bg-dark);
}

.btn-success:hover {
    background: #00cc88;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.5);
}

/* Button Sizes */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Textarea Container and Control Buttons */
.textarea-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.textarea-container textarea {
    flex: 1;
    resize: vertical;
    min-height: 44px;
}

/* Voice Input and Generate Prompt Buttons */
.voice-input-btn,
.generate-prompt-btn {
    position: relative;
    top: 0;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--primary-cyan);
    padding: 8px 12px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-normal);
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.voice-input-btn:hover,
.generate-prompt-btn:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
    transform: translateY(-1px);
}

/* Voice Input Button States */
.voice-input-btn.recording {
    background: rgba(255, 100, 100, 0.2);
    border-color: #ff6464;
    color: #ff6464;
    animation: pulse-recording 1.5s infinite;
}

.voice-input-btn.processing {
    background: rgba(255, 165, 0, 0.2);
    border-color: #ffa500;
    color: #ffa500;
    animation: pulse-processing 1s infinite;
}

@keyframes pulse-recording {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes pulse-processing {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Cards - Dynamic Scaling */
.card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--card-border-radius);
    padding: var(--card-padding);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.card:hover {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: var(--shadow-medium);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.card-body {
    flex: 1;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001; /* Above loading overlay (10000) for all standard modals */
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* CRITICAL: Force modal visibility when active class is added - highest specificity */
.modal-overlay.active,
#settings-modal.active,
#feedback-detail-modal.active,
#invitation-modal.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
}

/* Ensure inline styles set by JavaScript work */
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="visibility: visible"] {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.modal-content {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(26, 26, 26, 0.9));
    border: 2px solid var(--primary-cyan);
    border-radius: var(--card-border-radius);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    transform: scale(0.9);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--modal-padding);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

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

/* Status Messages */
.status-message {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    margin: 0.5rem 0;
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

.status-message.success {
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid rgba(0, 255, 170, 0.3);
    color: var(--success-color);
}

.status-message.error {
    background: rgba(255, 102, 102, 0.1);
    border: 1px solid rgba(255, 102, 102, 0.3);
    color: var(--error-color);
}

.status-message.warning {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    color: var(--warning-color);
}

.status-message.info {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--primary-cyan);
}

/* Loading States */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 255, 255, 0.2);
    border-top: 3px solid var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--primary-cyan), var(--primary-cyan-dark));
    border-radius: var(--border-radius-small);
    transition: width var(--transition-normal);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }

.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-cyan), #0080ff);
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-cyan-light), var(--primary-cyan));
}

/* Animation Base Classes */
.fade-in {
    animation: fadeIn var(--transition-normal) ease-in-out;
}

.slide-up {
    animation: slideUp var(--transition-normal) ease-out;
}

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

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

/* Focus Management */
.modal-open {
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Settings Tabs Base Styles */
.settings-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 200, 0.3);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    z-index: 10;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.tab-button {
    background: rgba(0, 255, 200, 0.1);
    border: none;
    color: #ffffff;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    font-size: 14px;
    flex: 1;
    min-width: 100px;
    max-width: 180px;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.tab-button:hover {
    background: rgba(0, 255, 200, 0.2);
}

.tab-button.active {
    background: rgba(0, 255, 200, 0.3);
    border-bottom: 2px solid #00ffc8;
}

/* Tab Content */
.tab-content-wrapper {
    max-height: calc(85vh - 160px);
    overflow-y: auto;
    padding: 20px 20px 0 20px;
    margin: 0;
    position: relative;
    z-index: 1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

/* === Landing Page Core Styles === */

/* Landing page body styles - only when not using main interface */
body:not(.main-interface) {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 30px;
    position: relative;
}

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(40, 40, 40, 0.5) 0%, rgba(26, 26, 26, 0.8) 70%);
    z-index: -1;
}

/* Widget Container - only for landing page */
body:not(.main-interface) #widget-container {
    max-width: 650px;
    width: 90%;
    margin: 0 auto;
    padding: 30px 40px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.3);
    z-index: 1;
    text-align: center;
}

/* Title Override for Landing */
h1 {
    font-family: 'Orbitron', sans-serif;
    color: #00ffff;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 0 10px #00ffff;
}

/* Avatar Placement - only for landing page */
body:not(.main-interface) #avatar-placeholder {
    width: 400px;
    height: 400px;
    margin: 0 auto 20px auto;
}

body:not(.main-interface) #avatar-container {
    position: absolute;
    width: 400px;
    height: 400px;
    border: none;
    cursor: move;
    background-color: transparent;
    z-index: 100;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    pointer-events: none;
}

#avatar-container canvas {
    pointer-events: auto;
    display: block;
    transition: width 0.3s ease, height 0.3s ease;
    /* Fix Three.js canvas scaling issues in low resolution scenarios */
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    /* Prevent canvas from overflowing container */
    box-sizing: border-box !important;
}

/* Controls Area */
#controls-area {
    text-align: center;
    margin-top: 20px;
}

/* Form Elements Override */
button, input[type="text"], input[type="number"], input[type="url"], select, textarea {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.5);
    color: #e0e0e0;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Roboto', sans-serif;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Button Override */
button {
    background-color: #00ffff;
    color: #1a1a1a;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    padding: 12px 30px;
}

button:hover {
    background-color: #00cccc;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
    border-color: #00ffff;
}

/* Enhanced Delete Button - Inline with Names */
.delete-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border-radius: 4px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    opacity: 0 !important;
    margin-left: 8px !important;
    text-transform: none !important;
    font-family: inherit !important;
    font-weight: normal !important;
    box-shadow: none !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

.delete-btn:hover {
    background: rgba(220, 53, 69, 0.2) !important;
    border-color: rgba(220, 53, 69, 0.5) !important;
    color: #dc3545 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3) !important;
}

/* Enhanced Rename Button - Matching Delete Button Styling */
.rename-btn {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: rgba(255, 255, 255, 0.5) !important;
    border-radius: 4px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    opacity: 0 !important;
    margin-left: 8px !important;
    text-transform: none !important;
    font-family: inherit !important;
    font-weight: normal !important;
    box-shadow: none !important;
    min-width: 24px !important;
    min-height: 24px !important;
}

.rename-btn:hover {
    background: rgba(0, 255, 255, 0.2) !important;
    border-color: rgba(0, 255, 255, 0.5) !important;
    color: #00ffff !important;
    transform: scale(1.05) !important;
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.3) !important;
}

.delete-btn:active {
    transform: scale(0.95) !important;
    background: rgba(220, 53, 69, 0.3) !important;
}

.rename-btn:active {
    transform: scale(0.95) !important;
    background: rgba(0, 255, 255, 0.3) !important;
}

.switcher-item:hover .delete-btn {
    opacity: 1 !important;
}

.switcher-item:hover .rename-btn {
    opacity: 1 !important;
}

/* Enhanced item-name styling to accommodate inline delete button */
.item-name {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

.item-name .delete-btn {
    margin-left: 8px !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

.item-name .rename-btn {
    margin-left: 8px !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}

.switcher-item:hover .item-name .delete-btn {
    opacity: 1 !important;
}

.switcher-item:hover .item-name .rename-btn {
    opacity: 1 !important;
}

/* Mobile responsive for delete and rename buttons */
@media (max-width: 768px) {
    .delete-btn {
        opacity: 0.7 !important; /* More visible on mobile for touch access */
        font-size: 14px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 6px 8px !important;
    }
    
    .rename-btn {
        opacity: 0.7 !important; /* More visible on mobile for touch access */
        font-size: 14px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        padding: 6px 8px !important;
    }
    
    .delete-btn:hover {
        opacity: 1 !important;
        background: rgba(220, 53, 69, 0.25) !important;
    }
    
    .rename-btn:hover {
        opacity: 1 !important;
        background: rgba(0, 255, 255, 0.25) !important;
    }
    
    .switcher-item:hover .delete-btn,
    .switcher-item:hover .item-name .delete-btn {
        opacity: 1 !important;
    }
    
    .switcher-item:hover .rename-btn,
    .switcher-item:hover .item-name .rename-btn {
        opacity: 1 !important;
    }
    
    /* Ensure item names have space for the inline delete button on mobile */
    .item-name {
        gap: 6px !important;
    }
}

/* Text Chat Input Styles */
.text-chat-container {
    margin: 10px 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.text-chat-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.text-chat-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.text-chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s ease;
}

.text-chat-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

.text-chat-input:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
}

.text-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.text-chat-send {
    padding: 8px 12px;
    background: var(--primary-cyan);
    border: none;
    border-radius: 6px;
    color: var(--bg-dark);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.text-chat-send:hover:not(:disabled) {
    background: var(--primary-cyan-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.3);
}

.text-chat-send:active:not(:disabled) {
    transform: translateY(0);
}

.text-chat-send:disabled {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.send-icon {
    font-size: 14px;
}


.text-chat-status {
    text-align: center;
    margin-top: 8px;
}

.text-chat-status .status-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Chat Log - Premium Styling */
#chat-log {
    height: 120px;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 20, 30, 0.95), rgba(10, 25, 35, 0.9));
    border: 2px solid rgba(0, 255, 255, 0.4);
    padding: 16px;
    margin-top: 15px;
    margin-bottom: 10px;
    text-align: left;
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 
        0 8px 32px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Chat Messages */
.chat-message {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    animation: fadeInMessage 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.chat-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0.5;
}

/* User Messages */
.chat-message.user-message {
    background: linear-gradient(135deg, rgba(0, 255, 200, 0.15), rgba(0, 200, 160, 0.1));
    border-left: 4px solid #00ffc8;
    margin-left: 20px;
}

/* Avatar Messages */
.chat-message.avatar-message {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.12), rgba(80, 120, 200, 0.08));
    border-left: 4px solid #6496ff;
    margin-right: 20px;
}

/* System Messages */
.chat-message.system-message {
    background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 140, 0, 0.1));
    border-left: 4px solid #ffaa00;
    margin-left: 10px;
    margin-right: 10px;
}

/* Message Header */
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.message-sender {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.user-message .message-sender {
    color: #00ffc8;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.4);
}

.avatar-message .message-sender {
    color: #6496ff;
    text-shadow: 0 0 8px rgba(100, 150, 255, 0.4);
}

.system-message .message-sender {
    color: #ffaa00;
    text-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}

.message-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Message Content */
.message-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.user-message .message-content {
    font-weight: 500;
}

.avatar-message .message-content {
    color: #f0f8ff;
}

.system-message .message-content {
    color: #fff5e6;
    font-style: italic;
}

/* Legacy support for old format */
#chat-log p {
    margin: 0 0 8px 0;
    word-wrap: break-word;
    line-height: 1.6;
    color: #ffffff;
    font-size: 0.95rem;
}

#chat-log .user-message {
    font-weight: 600;
    color: #00ffc8;
    text-shadow: 0 0 8px rgba(0, 255, 200, 0.4);
}

#chat-log .avatar-message {
    color: #f0f8ff;
}

/* Animation */
@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Signin Overlay */
#signin-overlay {
    position: fixed; /* Cover the whole viewport */
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - 50px); /* Reduce footer space to eliminate gap */
    min-height: calc(100vh - 50px); /* Ensure minimum height matches */
    background: linear-gradient(135deg, #0d0d0d 0%, #0a1a1a 25%, #0d1a16 50%, #0a1618 75%, #0d0d0d 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex; /* Use flexbox for centering */
    flex-direction: column; /* Stack title and button vertically */
    justify-content: flex-start; /* Start from top instead of center */
    align-items: center; /* Center horizontally */
    z-index: 10000; /* Higher z-index to ensure it's above main interface */
    transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1); /* Smooth material design transition */
    overflow-y: auto; /* Allow scrolling */
    overflow-x: hidden; /* Hide horizontal overflow */
    padding: 20px 0 70px 0; /* Extra bottom padding to ensure footer visibility */
    transform: translateY(0); /* Initial position */
    box-sizing: border-box; /* Include padding in height calculation */
    /* Ensure seamless coverage */
    margin-bottom: -1px; /* Slight overlap to eliminate any potential gap */
}

/* Black Hole Animation */
a-hole {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

a-hole:before {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: block;
    width: 150%;
    height: 140%;
    background: radial-gradient(ellipse at 50% 55%, transparent 15%, rgba(0, 0, 0, 0.7) 60%);
    transform: translate3d(-50%, -50%, 0);
    content: "";
}

a-hole:after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    display: block;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at 50% 75%,
        rgba(0, 255, 255, 0.3) 20%,
        transparent 75%
    );
    mix-blend-mode: overlay;
    transform: translate3d(-50%, -50%, 0);
    content: "";
}

@keyframes aura-glow {
    0% {
        background-position: 0 100%;
    }
    100% {
        background-position: 0 300%;
    }
}

a-hole .aura {
    position: absolute;
    top: -71.5%;
    left: 50%;
    z-index: 3;
    width: 30%;
    height: 140%;
    background: linear-gradient(
            20deg,
            rgba(0, 248, 241, 0.4),
            rgba(0, 255, 200, 0.1) 16.5%,
            rgba(0, 212, 170, 0.3) 33%,
            rgba(0, 212, 170, 0.1) 49.5%,
            rgba(0, 248, 241, 0.4) 66%,
            rgba(0, 248, 241, 0.2) 85.5%,
            rgba(0, 255, 200, 0.3) 100%
        )
        0 100% / 100% 200%;
    border-radius: 0 0 100% 100%;
    filter: blur(40px);
    mix-blend-mode: plus-lighter;
    opacity: 0.5;
    transform: translate3d(-50%, 0, 0);
    animation: aura-glow 8s infinite linear;
}

a-hole .overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.1) 2px,
        rgba(255, 255, 255, 0.1) 3px
    );
    mix-blend-mode: overlay;
    opacity: 0.3;
}

a-hole canvas {
    display: block;
    width: 100%;
    height: 100%;
}



@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#signin-overlay.hidden {
    opacity: 0;
    transform: translateY(-20px); /* Slide up slightly when hiding */
    pointer-events: none; /* Prevent interaction when hidden */
}

/* Footer is now properly positioned outside signin overlay */

/* Style for the logo image */
#nexus-logo {
    max-width: 300px; /* Reduced size to make room for other elements */
    height: auto;     /* Ensure height scales proportionally */
    margin-bottom: 30px; /* Add some space below the logo */
    cursor: pointer; /* Indicate it's clickable */
}

/* Welcome text styling */
.signin-welcome {
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
    flex-shrink: 0; /* Prevent shrinking */
}

.signin-welcome h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 300;
    letter-spacing: -0.5px;
}

.signin-welcome p {
    font-size: 1.2rem;
    margin: 0;
    opacity: 0.8;
}

/* Welcome bonus info styling */
.welcome-bonus-info {
    background-color: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.bonus-highlight {
    font-size: 1.1rem;
    color: #00ffff;
    font-weight: bold;
    margin: 0 0 8px 0;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.bonus-details {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin: 0;
    line-height: 1.4;
}

/* Sign-in options container */
.signin-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Primary Google Sign-In Button */
.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 6px;
    padding: 12px 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 240px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.google-signin-btn:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.google-signin-btn:active {
    background-color: #f1f3f4;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transform: translateY(0);
}

/* Choose Account Button */
.choose-account-btn {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 240px;
}

.choose-account-btn:hover {
    border-color: rgba(255,255,255,0.6);
    background-color: rgba(255,255,255,0.1);
}

.choose-account-btn:active {
    background-color: rgba(255,255,255,0.2);
}

/* Help text styling */
.signin-help {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 20px;
    text-align: center;
    font-style: italic;
}

/* Google's official button container styling */
#google-signin-container {
    margin: 10px 0;
    z-index: 1001; /* Ensure button is above animation */
    /* Display controlled by JavaScript based on authentication state */
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .signin-welcome h1 {
        font-size: 2rem;
    }
    
    .signin-welcome p {
        font-size: 1rem;
    }
    
    .google-signin-btn,
    .choose-account-btn {
        min-width: 200px;
        font-size: 13px;
    }
    
    #nexus-logo {
        max-width: 250px;
    }
    
    .signin-help {
        font-size: 0.8rem;
    }
    
    /* Reduce animation complexity on mobile for better performance */
    a-hole .aura {
        filter: blur(25px); /* Reduce blur for better mobile performance */
        animation-duration: 8s; /* Slower animation on mobile */
    }
    
    a-hole .overlay {
        opacity: 0.3; /* Reduce overlay intensity on mobile */
    }
}

@media (max-width: 768px) {
    /* Reduce animation complexity on tablets */
    a-hole .aura {
        filter: blur(35px); /* Moderate blur for tablets */
        animation-duration: 6s;
    }
    
    a-hole .overlay {
        opacity: 0.4; /* Moderate overlay intensity on tablets */
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Respect user's motion preferences */
    a-hole .aura {
        animation: none;
    }
    
    a-hole .overlay {
        opacity: 0.2; /* Reduce visual complexity for motion-sensitive users */
    }
}

    
    #signin-overlay {
        animation: none;
        background: linear-gradient(135deg, #0d0d0d, #1a1a1a, #0d0d0d);
    }
}

/* === RBAC Permission and Project Token Styles === */

/* Permission Indicators */
.permission-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    margin-bottom: 4px;
}

.permission-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: default;
    backdrop-filter: blur(4px);
}

.permission-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 255, 200, 0.3);
}

.permission-badge.owner {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3), rgba(139, 195, 74, 0.2));
    color: #81C784;
    border-color: rgba(76, 175, 80, 0.5);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.permission-badge.owner::before {
    content: "👑";
    font-size: 10px;
}

.permission-badge.admin {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 152, 0, 0.2));
    color: #FFB74D;
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.2);
}

.permission-badge.admin::before {
    content: "🔧";
    font-size: 10px;
}

.permission-badge.member {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.3), rgba(3, 169, 244, 0.2));
    color: #64B5F6;
    border-color: rgba(33, 150, 243, 0.5);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

.permission-badge.member::before {
    content: "👤";
    font-size: 10px;
}

.permission-badge.project-admin {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.3), rgba(142, 36, 170, 0.2));
    color: #BA68C8;
    border-color: rgba(156, 39, 176, 0.5);
    box-shadow: 0 2px 4px rgba(156, 39, 176, 0.2);
}

.permission-badge.project-admin::before {
    content: "⚙️";
    font-size: 10px;
}

.permission-badge.project-editor {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.3), rgba(255, 193, 7, 0.2));
    color: #FFB74D;
    border-color: rgba(255, 152, 0, 0.5);
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

.permission-badge.project-editor::before {
    content: "✏️";
    font-size: 10px;
}

.permission-badge.project-viewer {
    background: linear-gradient(135deg, rgba(158, 158, 158, 0.3), rgba(189, 189, 189, 0.2));
    color: #BDBDBD;
    border-color: rgba(158, 158, 158, 0.5);
    box-shadow: 0 2px 4px rgba(158, 158, 158, 0.2);
}

.permission-badge.project-viewer::before {
    content: "👁️";
    font-size: 10px;
}

/* No Access Badge */
.permission-badge.no-access {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.2), rgba(229, 57, 53, 0.1));
    color: #E57373;
    border-color: rgba(244, 67, 54, 0.3);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.2);
}

.permission-badge.no-access::before {
    content: "🚫";
    font-size: 10px;
}

/* Request Access Styling */
.request-access-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
    text-align: center;
}

.request-access-section h6 {
    color: #FFB74D;
    margin-bottom: 10px;
    font-weight: 600;
}

.request-access-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    font-size: 14px;
}

.request-access-button {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.request-access-button:hover {
    background: linear-gradient(135deg, #F57C00, #E65100);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.request-access-button:active {
    transform: translateY(0);
}

.request-access-button::before {
    content: "📩";
    font-size: 16px;
}

.request-access-button:disabled {
    background: rgba(255, 152, 0, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Access Request Items */
.access-request-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.access-request-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 255, 200, 0.3);
}

.access-request-info {
    flex: 1;
}

.access-request-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.access-request-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.access-request-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.access-request-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.access-request-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.approve-request-button {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
}

.approve-request-button:hover {
    background: linear-gradient(135deg, #388E3C, #2E7D32);
    transform: translateY(-1px);
}

.reject-request-button {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.reject-request-button:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    transform: translateY(-1px);
}

/* Access Request Status Badges */
.access-request-status {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.access-request-status.pending {
    background: rgba(255, 152, 0, 0.2);
    color: #FFB74D;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.access-request-status.approved {
    background: rgba(76, 175, 80, 0.2);
    color: #81C784;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.access-request-status.rejected {
    background: rgba(244, 67, 54, 0.2);
    color: #E57373;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Enhanced Public Organization Cards */
.public-organization-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.public-organization-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ffc8, #00d4a3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.public-organization-card:hover::before {
    opacity: 1;
}

.public-organization-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 255, 200, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 255, 200, 0.1);
}

.organization-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.organization-card-info {
    flex: 1;
}

.organization-card-name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.organization-card-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    gap: 12px;
}

.organization-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Browse Projects Modal */
.browse-projects-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10001; /* Higher than settings modal */
    align-items: center;
    justify-content: center;
}

.browse-projects-modal.active {
    display: flex;
}

.browse-projects-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.browse-projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browse-projects-header h3 {
    color: #00ffc8;
    margin: 0;
}

.browse-projects-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.browse-projects-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.browse-projects-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.public-project-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 200, 0.2);
    border-radius: 8px;
    padding: 16px;
    position: relative;
    transition: all 0.3s ease;
}

.public-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 255, 200, 0.02) 0%, 
        transparent 50%, 
        rgba(0, 255, 200, 0.02) 100%);
    border-radius: 8px;
        opacity: 0;
    transition: opacity 0.3s ease;
    }

.public-project-card:hover::before {
        opacity: 1;
    }

.public-project-card:hover {
    border-color: rgba(0, 255, 200, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 200, 0.1);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.project-card-info {
    flex: 1;
}

.project-card-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.project-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.project-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.empty-projects {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

.empty-projects p {
    margin-bottom: 8px;
    color: #ffffff;
}

.empty-projects small {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.loading-projects {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.7);
}

/* Compatibility aliases for organizations - can be used for both */
.browse-organizations-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.browse-organizations-modal.active {
    display: flex;
}

.browse-organizations-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.browse-organizations-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.browse-organizations-header h3 {
    color: #00ffc8;
    margin: 0;
}

.browse-organizations-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.browse-organizations-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.browse-organizations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Budget Indicators */
.budget-indicator {
    margin-top: 6px;
    padding: 2px 0;
}

.budget-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2px;
}

.budget-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.budget-bar.warning .budget-fill {
    background: #FF9800;
}

.budget-bar.critical .budget-fill {
    background: #f44336;
}

.budget-text {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Permission-aware element states */
.permission-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.permission-granted {
    /* Additional styling for granted permissions if needed */
}

.permission-denied {
    /* Additional styling for denied permissions if needed */
}

.permission-indicator {
    position: relative;
    display: inline-block;
}

.permission-indicator::after {
    content: "🔒";
    position: absolute;
    top: -2px;
    right: -8px;
    font-size: 8px;
    opacity: 0.6;
}

.permission-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 14px;
    backdrop-filter: blur(10px);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.permission-notification.notification-warning {
    border-left: 3px solid #FF9800;
}

.permission-notification.notification-error {
    border-left: 3px solid #f44336;
}

.permission-notification.notification-info {
    border-left: 3px solid #2196F3;
}

/* Organization Management Tab Styles */
.role-display {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 255, 200, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 200, 0.3);
}

.role-label {
    color: #00ffc8;
    font-weight: 600;
    margin-right: 8px;
}

.budget-display {
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 255, 200, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 200, 0.2);
}

.budget-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.budget-label {
    color: #00ffc8;
    font-weight: 600;
}

.budget-amount {
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1em;
}

.budget-unit {
    color: #888;
}

.budget-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.budget-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ffc8, #00d4a3);
    transition: width 0.3s ease;
}

.budget-health {
    display: flex;
    align-items: center;
    gap: 6px;
}

.health-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
}

.health-indicator.healthy {
    background: #00ff00;
}

.health-indicator.warning {
    background: #ffaa00;
}

.health-indicator.critical {
    background: #ff0000;
}

.health-indicator.no-budget {
    background: #888;
    color: #ccc;
}

/* Context Messages in Settings Modal */
.context-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.context-message.success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #2E7D32;
}

.context-message.warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #F57F17;
}

.context-message.error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #C62828;
}

.context-message strong {
    font-weight: 600;
}

.context-message small {
    display: block;
    margin-top: 4px;
    opacity: 0.8;
}

.health-text {
    color: #ccc;
    font-size: 0.9em;
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.members-list {
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

.loading-members,
.loading-permissions {
    color: #888;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.budget-management {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.budget-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.budget-input-group input {
    flex: 1;
    min-width: 0;
}

.transfer-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.transfer-group select,
.transfer-group input {
    flex: 1;
    min-width: 0;
}

.permissions-overview {
    max-height: 400px;
    overflow-y: auto;
}

.permissions-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.permission-category h6 {
    color: #00ffc8;
    margin-bottom: 8px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 255, 200, 0.3);
    padding-bottom: 4px;
}

.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.permission-badge.granted {
    background: rgba(0, 255, 200, 0.1);
    border-color: rgba(0, 255, 200, 0.3);
    color: #00ffc8;
}

.no-permissions {
    text-align: center;
    color: #888;
    padding: 20px;
    font-style: italic;
}

.error {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
}

#floating-login-container.hide {
    display: none;
}

.floating-signin-btn {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    border: none;
    border-radius: 28px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    justify-content: center;
    vertical-align: top;
    line-height: 1;
}

.floating-signin-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #3367d6, #2e7d32);
    filter: brightness(1.1);
}

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

.floating-signin-btn svg {
    flex-shrink: 0;
}

/* Floating Documentation Button */
.floating-docs-btn {
    background: linear-gradient(135deg, #00d4ff, #00a6cc);
    color: white;
    border: none;
    border-radius: 28px;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    vertical-align: top;
    line-height: 1;
}

.floating-docs-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #00b8e6, #008fb3);
    color: white;
    filter: brightness(1.1);
}

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

.floating-docs-btn svg {
    flex-shrink: 0;
}

/* Tablet adjustments for floating buttons - closer spacing */
@media (max-width: 768px) and (min-width: 481px) {
    #floating-docs-container {
        right: 160px; /* Closer spacing on tablets */
    }
    
    .floating-signin-btn,
    .floating-docs-btn {
        padding: 12px 18px;
        font-size: 13px;
        min-width: 130px;
    }
}

/* Mobile adjustments for floating buttons - stack vertically on mobile */
@media (max-width: 480px) {
    #floating-docs-container {
        top: 15px;
        right: 15px; /* Align with login button */
    }
    
    #floating-login-container {
        top: 70px; /* Stack below docs button */
        right: 15px;
    }
    
    .floating-signin-btn,
    .floating-docs-btn {
        padding: 12px 20px;
        font-size: 13px;
        min-width: 120px;
    }
    
    .floating-signin-btn svg,
    .floating-docs-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* === Configuration Area Styles === */

#dynamic-config-area {
    margin-top: 20px;
}

#dynamic-config-area h4 {
    font-family: 'Orbitron', sans-serif;
    color: #00ffff;
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 8px #00ffff;
}

.playground-description {
    font-size: 0.9rem;
    color: #a0a0a0;
    text-align: center;
    margin-bottom: 25px;
    line-height: 1.5;
}

.playground-description strong {
    color: #00ffc8;
    font-weight: bold;
}

.config-section {
    margin-bottom: 25px;
}

.config-section h5 {
    font-family: 'Orbitron', sans-serif;
    color: #00ffc8;
    font-size: 1.1em;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.config-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.config-card:hover {
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* Knowledge Base Section Styles */
.knowledge-subsection {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.knowledge-subsection:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.knowledge-subsection h6 {
    margin: 0 0 10px 0;
    color: #00ffc8;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subsection-description {
    margin: 0 0 15px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.4;
}

.knowledge-base-notice {
    background: rgba(0, 255, 200, 0.05);
    border: 1px solid rgba(0, 255, 200, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.knowledge-base-notice h6 {
    margin: 0 0 8px 0;
    color: #00ffc8;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
}

.knowledge-base-notice p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.4;
}

/* Knowledge Base Controls Styling */
.mobile-knowledge-base-section {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.mobile-knowledge-base-section h6 {
    color: var(--primary-cyan);
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.document-controls,
.youtube-controls,
.google-slides-controls {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.youtube-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.youtube-input-group input {
    margin-bottom: 0;
}

.document-list,
.youtube-video-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    background: rgba(0, 0, 0, 0.1);
}

.no-documents,
.no-videos {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.upload-progress {
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-small);
    overflow: hidden;
}

.upload-progress .progress-bar {
    height: 4px;
    background: rgba(0, 255, 255, 0.2);
    position: relative;
}

.upload-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-cyan-light));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.upload-progress span {
    display: block;
    padding: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Knowledge base responsive adjustments */
@media (max-width: 768px) {
    .mobile-knowledge-base-section {
        margin-top: 0.75rem;
        padding: 0.75rem;
    }
    
    .document-controls,
    .youtube-controls,
    .google-slides-controls {
        padding: 0.5rem;
    }
    
    .youtube-input-group {
        gap: 0.375rem;
    }
}

/* Bottom Buttons */
.bottom-buttons-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 25px;
    gap: 15px;
}

#feedback-trigger {
    background-color: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.4);
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
}

#feedback-trigger:hover {
    background-color: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 165, 0, 0.4);
}

/* Header Documentation Button - Desktop */
.header-docs-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 20px !important;
    background: rgba(0, 255, 255, 0.15) !important;
    border: 2px solid var(--primary-cyan) !important;
    border-radius: 8px !important;
    color: var(--primary-cyan) !important;
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s ease !important;
    margin-left: 20px !important;
    white-space: nowrap !important;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3) !important;
}

.header-docs-button:hover {
    background: rgba(0, 255, 255, 0.25) !important;
    border-color: var(--primary-cyan-light) !important;
    color: var(--primary-cyan-light) !important;
    text-decoration: none !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5) !important;
}

.header-docs-button svg {
    flex-shrink: 0 !important;
}

/* Mobile Header Documentation Button */
.mobile-header-docs-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    background: rgba(0, 255, 255, 0.15) !important;
    border: 1px solid var(--primary-cyan) !important;
    border-radius: 6px !important;
    color: var(--primary-cyan) !important;
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    margin-left: 12px !important;
    white-space: nowrap !important;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3) !important;
}

.mobile-header-docs-button:hover {
    background: rgba(0, 255, 255, 0.25) !important;
    border-color: var(--primary-cyan-light) !important;
    color: var(--primary-cyan-light) !important;
    text-decoration: none !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5) !important;
}

.mobile-header-docs-button svg {
    flex-shrink: 0 !important;
}

/* Toggle Switch Styles */
.toggle-switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #00ffff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-right: 10px;
}

/* Google Slides Specific Styles */
.google-slides-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.presentations-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    background: rgba(0, 0, 0, 0.1);
}

.presentation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

.presentation-item:hover {
    background: rgba(0, 255, 255, 0.05);
}

.presentation-item:last-child {
    border-bottom: none;
}

.presentation-info {
    flex: 1;
    margin-right: 1rem;
}

.presentation-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.presentation-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.presentation-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.presentation-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.presentation-actions button:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.4);
}

.presentation-actions .btn-danger {
    border-color: rgba(255, 99, 99, 0.3);
    color: #ff6363;
}

.presentation-actions .btn-danger:hover {
    background: rgba(255, 99, 99, 0.1);
    border-color: rgba(255, 99, 99, 0.5);
}

.no-presentations {
    text-align: center;
    color: var(--text-secondary);
    padding: 1rem;
    font-style: italic;
    opacity: 0.7;
}



/* Slide Preview Carousel */
.slide-preview-carousel {
    margin-top: 12px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
}

.carousel-loading, .carousel-error {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 12px;
}

.carousel-container {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.carousel-slides {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
}

.carousel-slide {
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: none;
    border-radius: 4px;
}

.carousel-slide.active {
    display: block;
}

.carousel-nav {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.carousel-nav:hover:not(:disabled) {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-indicator {
    text-align: center;
    margin-top: 4px;
}

.slide-counter {
    font-size: 10px;
    color: #888;
}

/* Presentation Selection Modal Adjustments */
.presentation-selection-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.presentation-info {
    flex: 1;
}

.presentation-title {
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 4px;
}

.presentation-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.import-presentation-btn {
    flex-shrink: 0;
    align-self: flex-start;
}

/* Google Slides Modal Styles */
.presentation-selection-item:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.2);
}

.presentation-selection-item .presentation-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.presentation-selection-item .presentation-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.import-presentation-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Slide Preview Styles */
.slides-preview {
    max-height: 400px;
    overflow-y: auto;
}

.slide-preview-item {
    padding: 1rem;
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.1);
}

.slide-preview-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.slide-content {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.slide-notes {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
    opacity: 0.8;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

/* ========================================
   PROFESSIONAL PRESENTATION PREVIEW MODAL
   ======================================== */

/* Enhanced Modal Overlay */
#presentation-preview-modal {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#presentation-preview-modal .modal-content {
    background: linear-gradient(135deg, 
        rgba(26, 26, 26, 0.95) 0%, 
        rgba(13, 13, 13, 0.98) 100%);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius-large);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Modal Header Enhancement */
#presentation-preview-modal .modal-header {
    background: linear-gradient(90deg, 
        rgba(0, 255, 255, 0.1) 0%, 
        rgba(0, 255, 255, 0.05) 100%);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    padding: 20px 24px;
    position: relative;
}

#presentation-preview-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-cyan) 50%, 
        transparent 100%);
}

#presentation-preview-modal .modal-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Modal Body Enhancement */
#presentation-preview-modal .modal-body {
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
}

/* Presentation Summary */
.presentation-summary {
    margin: 20px 24px;
    color: var(--text-primary);
    font-size: 1rem;
    opacity: 0.9;
}

/* Rich Slides Container */
.slides-preview-rich {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
}

.slides-preview-rich::-webkit-scrollbar {
    width: 8px;
}

.slides-preview-rich::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.slides-preview-rich::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, 
        rgba(0, 255, 255, 0.4) 0%, 
        rgba(0, 255, 255, 0.2) 100%);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.slides-preview-rich::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, 
        rgba(0, 255, 255, 0.6) 0%, 
        rgba(0, 255, 255, 0.4) 100%);
}

/* Individual Slide Item Enhancement */
.slide-preview-rich-item {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.02) 0%, 
        rgba(0, 255, 255, 0.01) 100%);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: var(--border-radius-large);
    margin-bottom: 32px;
    overflow: hidden;
    transition: all var(--transition-normal);
    position: relative;
}

.slide-preview-rich-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 255, 0.3) 50%, 
        transparent 100%);
}

.slide-preview-rich-item:hover {
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Slide Header Enhancement */
.slide-preview-header {
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.08) 0%, 
        rgba(0, 255, 255, 0.03) 100%);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    padding: 16px 20px;
}

.slide-preview-header h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.2);
}

/* Slide Content Layout Enhancement */
.slide-preview-content {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: flex-start;
}

/* Slide Image Container Enhancement */
.slide-image-container {
    flex: 0 0 400px;
    position: relative;
}

.slide-image-placeholder {
    width: 400px;
    height: 300px;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.6) 100%);
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.slide-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(0, 255, 255, 0.05) 50%, 
        transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.slide-image-placeholder:hover {
    border-color: rgba(0, 255, 255, 0.5);
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.05) 0%, 
        rgba(0, 0, 0, 0.6) 100%);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 16px rgba(0, 255, 255, 0.2);
    transform: scale(1.02);
}

.slide-image-placeholder:hover::before {
    opacity: 1;
}

.slide-image-placeholder div {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    z-index: 1;
    position: relative;
}

.slide-image-placeholder img {
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-normal);
}

.slide-image-placeholder img:hover {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 255, 0.2);
}

/* Analysis Container Enhancement */
.slide-analysis-container {
    flex: 1;
    min-width: 0;
}

/* Analysis Section Styling */
.slide-key-points,
.slide-speaker-notes,
.slide-business-insights,
.slide-visual-elements,
.slide-suggested-questions {
    margin-bottom: 20px;
    padding: 16px;
    border-radius: var(--border-radius);
    border-left: 3px solid transparent;
    transition: all var(--transition-normal);
}

.slide-key-points {
    background: linear-gradient(135deg, 
        rgba(0, 255, 255, 0.03) 0%, 
        rgba(0, 255, 255, 0.01) 100%);
    border-left-color: rgba(0, 255, 255, 0.4);
}

.slide-speaker-notes {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.02) 0%, 
        rgba(255, 255, 255, 0.01) 100%);
    border-left-color: rgba(255, 255, 255, 0.3);
}

.slide-business-insights {
    background: linear-gradient(135deg, 
        rgba(0, 255, 170, 0.03) 0%, 
        rgba(0, 255, 170, 0.01) 100%);
    border-left-color: rgba(0, 255, 170, 0.4);
}

.slide-visual-elements {
    background: linear-gradient(135deg, 
        rgba(255, 165, 0, 0.03) 0%, 
        rgba(255, 165, 0, 0.01) 100%);
    border-left-color: rgba(255, 165, 0, 0.4);
}

.slide-suggested-questions {
    background: linear-gradient(135deg, 
        rgba(255, 102, 102, 0.03) 0%, 
        rgba(255, 102, 102, 0.01) 100%);
    border-left-color: rgba(255, 102, 102, 0.4);
}

/* Section Headers */
.slide-analysis-container h5 {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Content Styling */
.slide-analysis-container ul {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.slide-analysis-container ul li {
    margin-bottom: 8px;
    position: relative;
}

.slide-analysis-container ul li::marker {
    color: rgba(0, 255, 255, 0.6);
}

.slide-analysis-container p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Fullscreen Modal Enhancement */
#slide-fullscreen-modal {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#slide-fullscreen-modal button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #000;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

#slide-fullscreen-modal button:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#slide-fullscreen-modal img {
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Responsive Enhancements */
@media (max-width: 1024px) {
    .slide-preview-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .slide-image-container {
        flex: none;
        align-self: center;
    }
    
    .slide-image-placeholder {
        width: 100%;
        max-width: 400px;
        height: 225px;
    }
}

@media (max-width: 768px) {
    #presentation-preview-modal .modal-content {
        margin: 10px;
        max-width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }
    
    .slides-preview-rich {
        padding: 16px;
        max-height: calc(100vh - 200px);
    }
    
    .slide-preview-content {
        padding: 16px;
    }
    
    .slide-image-placeholder {
        height: 200px;
    }
}

/* Form Action Buttons */
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.profile-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    padding: 20px 0 10px 0;
    border-top: 2px solid rgba(0, 255, 255, 0.2);
    position: relative;
}

.form-actions button {
    padding: 10px 25px;
    margin-left: 10px;
    background-color: #00ffff;
    color: #1a1a1a;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 5px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.form-actions button:hover {
    background-color: #00cccc;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
    border-color: #00ffff;
}

/* Modal Cancel Button */
.modal-cancel-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: #aaa;
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-cancel-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #eee;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Status Display */
#status, #loading-text {
    color: #a0a0a0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Draft/Publish Controls */
.draft-publish-controls {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
}

.draft-status-info {
    margin-bottom: 12px;
}

.draft-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 20px;
    font-size: 14px;
    color: #ffc107;
}

.draft-indicator.published {
    background: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.draft-indicator .status-icon {
    font-size: 16px;
}

.draft-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.draft-actions button {
    flex: 1;
    min-width: 120px;
}

/* Success button styling for publish */
.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 1px solid #28a745;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    border-color: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.btn-success:disabled {
    background: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Project-Level Actions */
.project-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-actions .help-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Export/Import Controls */
.export-import-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.export-import-actions button {
    flex: 1;
    min-width: 140px;
}

/* Import Modal Styling */
.import-step {
    margin-bottom: 20px;
}

.import-step h4 {
    color: #00ffff;
    margin-bottom: 16px;
    font-size: 16px;
}

.file-upload-area {
    margin-bottom: 20px;
}

.file-drop-zone {
    border: 2px dashed rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: rgba(0, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-drop-zone:hover {
    border-color: rgba(0, 255, 255, 0.6);
    background: rgba(0, 255, 255, 0.1);
}

.file-drop-zone.dragover {
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.15);
}

.file-drop-content {
    color: rgba(255, 255, 255, 0.8);
}

.file-drop-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.file-drop-content p {
    margin: 8px 0;
    font-size: 16px;
}

.file-drop-content small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.file-selected-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 6px;
    color: #28a745;
}

.file-info-icon {
    font-size: 20px;
}

.file-name {
    flex: 1;
    font-weight: 500;
}

.btn-link {
    background: none;
    border: none;
    color: #00ffff;
    cursor: pointer;
    text-decoration: underline;
    font-size: 14px;
    padding: 0;
}

.btn-link:hover {
    color: #66ffff;
}

.import-preview {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
}

.import-preview h5 {
    color: #00ffff;
    margin-bottom: 12px;
}

.preview-info p {
    margin: 6px 0;
    color: rgba(255, 255, 255, 0.9);
}

.preview-info strong {
    color: #00ffff;
}

.import-warning {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 4px;
}

.import-warning p {
    margin: 8px 0;
    color: #ffc107;
    font-size: 14px;
}

.import-warning p:first-child {
    margin-top: 0;
}

.import-warning p:last-child {
    margin-bottom: 0;
}

/* Enfuse Attribution Footer */
.enfuse-attribution-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    text-align: center;
    padding: 15px 20px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Inter', 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    font-weight: 500;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999; /* Below signin overlay to prevent conflicts */
}

.enfuse-attribution-footer a {
    color: #00ffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.enfuse-attribution-footer a:hover {
    color: #66ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
    text-decoration: underline;
}

/* === Landing Page Feature Sections === */

/* Value Info Section */
.value-info {
    margin: 20px 0 0 0;
    text-align: center;
    max-width: 1000px;
    width: 100%;
    padding: 0 20px;
}

/* Value Highlights */
.value-highlights {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 1rem;
    color: #e0e0e0;
    text-align: left;
    transition: all 0.3s ease;
}

.highlight-item.expandable {
    cursor: pointer;
    flex-direction: column;
    align-items: flex-start;
}

.highlight-item.expandable:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: rgba(0, 255, 255, 0.5);
}

.highlight-item .highlight-main {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.highlight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.highlight-text {
    font-weight: 600;
    flex-grow: 1;
}

.expand-arrow {
    font-size: 0.8rem;
    color: #00ffff;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.highlight-item.expanded .expand-arrow {
    transform: rotate(180deg);
}

.highlight-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    width: 100%;
}

.highlight-item.expanded .highlight-details {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.highlight-details p {
    margin: 0 0 10px 0;
    line-height: 1.5;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.highlight-details p:last-child {
    margin-bottom: 0;
}

.highlight-details strong {
    color: #00ffff;
}

/* Tech Advantage Section */
.tech-advantage-section {
    margin: 40px 0;
    padding: 40px 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    border-radius: 20px;
    border: 2px solid #00d4aa;
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.1);
}

.advantage-header {
    text-align: center;
    margin-bottom: 40px;
}

.advantage-header h2 {
    color: #00d4aa;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.advantage-subtitle {
    color: #888;
    font-size: 1.1em;
    margin: 0;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.advantage-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.advantage-card:hover {
    transform: translateY(-5px);
    border-color: #00d4aa;
    box-shadow: 0 15px 35px rgba(0, 212, 170, 0.2);
}

.advantage-icon {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.advantage-card h4 {
    color: #00d4aa;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: 600;
}

.advantage-card p {
    color: #ccc;
    line-height: 1.6;
    margin: 0;
}

.advantage-cta {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 212, 170, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.advantage-bottom-text {
    color: #fff;
    font-size: 1.1em;
    margin: 0;
}

/* Customer Testimonials Section */
.testimonials-section {
    margin: 50px 0;
    padding: 40px 30px;
    background: linear-gradient(135deg, #2d1b69 0%, #11998e 100%);
    border-radius: 20px;
    border: 2px solid #00d4aa;
    box-shadow: 0 10px 30px rgba(0, 212, 170, 0.15);
}

.testimonials-header {
    text-align: center;
    margin-bottom: 40px;
}

.testimonials-header h3 {
    color: #fff;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 700;
}

.testimonials-subtitle {
    color: #ccc;
    font-size: 1.1em;
    margin: 0;
}

.testimonials-carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    animation: fadeIn 0.8s ease-in-out;
}

.testimonial-slide.active {
    display: block;
    opacity: 1;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonial-quote {
    color: #fff;
    font-size: 1.2em;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: 25px;
    position: relative;
}

.testimonial-quote::before {
    content: '"';
    font-size: 3em;
    color: #00d4aa;
    position: absolute;
    top: -15px;
    left: -10px;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.author-info {
    flex: 1;
}

.author-name {
    color: #00d4aa;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}

.author-title {
    color: #fff;
    font-size: 0.95em;
    margin-bottom: 3px;
}

.author-company {
    color: #ccc;
    font-size: 0.9em;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background: #00d4aa;
    border-color: #00d4aa;
}

.testimonial-dot:hover {
    border-color: #00d4aa;
}

.testimonials-cta {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.testimonials-bottom-text {
    color: #fff;
    font-size: 1.1em;
    margin: 0;
}

/* === Token Packages Pricing Styles === */

.token-packages {
    margin-bottom: 25px;
}

.token-packages h4 {
    color: #e0e0e0;
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 15px;
}

.package-card {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 260px;
}

.package-card:hover {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.1);
    transform: translateY(-2px);
}

.package-card.professional {
    border-color: rgba(0, 255, 255, 0.4);
    background: rgba(0, 255, 255, 0.08);
}

.package-header {
    margin-bottom: 15px;
}

.package-header h5 {
    color: #00ffff;
    margin: 0 0 6px 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.05em;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.package-badge {
    background: linear-gradient(45deg, #00ffff, #00cccc);
    color: #1a1a1a;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.package-details {
    flex-grow: 1;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.token-amount {
    font-size: 1.4em;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 8px;
    font-family: 'Orbitron', sans-serif;
}

.time-estimate {
    color: #a0a0a0;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.rate-info {
    color: #888;
    font-size: 0.8em;
    font-style: italic;
}

.package-features {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.85em;
    text-align: center;
    color: #00ffff;
}

.package-features strong {
    color: #00ffff;
    font-weight: 600;
}

.package-price {
    font-size: 2.2em;
    font-weight: bold;
    color: #00ffff;
    margin: 15px 0;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.package-price::before {
    content: '$';
    font-size: 0.7em;
    vertical-align: top;
}

.professional-buy {
    background: linear-gradient(45deg, #00ffff, #00cccc);
    border: none;
    color: #1a1a1a;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.2);
    cursor: pointer;
    width: 100%;
    margin-top: auto;
}

.professional-buy:hover {
    background: linear-gradient(45deg, #00cccc, #009999);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.3);
}

.starter-buy {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: #00ffff;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
}

.starter-buy:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.1);
}

.jump-start-buy {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
}

.jump-start-buy:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

/* Mobile responsiveness for package grid */
@media (max-width: 768px) {
    .package-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .package-card {
        padding: 15px;
    }
    
    .package-price {
        font-size: 1.8em;
    }
}

/* === Avatar Preview in Sign-in Overlay === */
#avatar-preview-container {
    width: 315px;
    height: 315px;
    margin: 20px auto 30px auto;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(0, 200, 200, 0.05) 100%);
    border: 2px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent shrinking */
}

#avatar-preview-container canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50%;
}

/* Loading spinner - full size ring around the preview */
#avatar-preview-container .loading-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #00ffff;
    border-radius: 50%;
    animation: spin 2s linear infinite;
    z-index: 3;
}

/* Loading text */
#avatar-preview-container .loading-text {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(0, 255, 255, 0.8);
    font-size: 0.85em;
    font-style: italic;
    white-space: nowrap;
    z-index: 2;
}

/* Fallback content while avatar loads - but hide it when spinner is active */
#avatar-preview-container::before {
    content: "👤";
    font-size: 4em;
    color: rgba(0, 255, 255, 0.3);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    /* Hide the fallback icon when loading spinner is present */
    display: none;
}

/* Hide loading elements when avatar is loaded */
#avatar-preview-container.avatar-loaded::before,
#avatar-preview-container.avatar-loaded .loading-spinner,
#avatar-preview-container.avatar-loaded .loading-text {
    display: none !important;
    visibility: hidden !important;
}

/* Mobile responsiveness for avatar preview */
@media (max-width: 768px) {
    #avatar-preview-container {
        width: 235px;
        height: 235px;
        margin-bottom: 20px;
    }
    
    #avatar-preview-container::before {
        font-size: 3em;
    }
    
    #avatar-preview-container .loading-spinner {
        border-width: 2px;
    }
    
    #avatar-preview-container .loading-text {
        font-size: 0.8em;
        bottom: -30px;
    }
}

@media (max-width: 480px) {
    #avatar-preview-container {
        width: 188px;
        height: 188px;
        margin-bottom: 15px;
    }
    
    #avatar-preview-container::before {
        font-size: 2.5em;
    }
    
    #avatar-preview-container .loading-spinner {
        border-width: 2px;
    }
    
    #avatar-preview-container .loading-text {
        font-size: 0.75em;
        bottom: -25px;
    }
}

/* === Main Avatar Loading Spinner === */
#avatar-container .avatar-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 10;
}

#avatar-container .avatar-loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 255, 0.2);
    border-top: 3px solid #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#avatar-container .avatar-loading-spinner .spinner-text {
    color: rgba(0, 255, 255, 0.8);
    font-size: 0.9em;
    font-style: italic;
    text-align: center;
    white-space: nowrap;
}

/* Billing History Section */
.billing-history-section {
    text-align: center;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(69, 160, 73, 0.1));
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    position: relative;
}

.billing-history-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 12px 12px 0 0;
}

.billing-history-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white !important;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    border: 2px solid transparent;
    letter-spacing: 0.5px;
}

.billing-history-button::before {
    content: "📊";
    font-size: 1.2em;
}

.billing-history-button:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.4);
    color: white !important;
    text-decoration: none;
    border-color: rgba(76, 175, 80, 0.5);
}

.billing-history-button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 15px rgba(76, 175, 80, 0.3);
}

/* Billing Info and Usage Note */
.billing-info {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.usage-note {
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
    color: #a0a0a0;
}

.usage-note .warning-icon {
    margin-right: 8px;
}

/* === Document Status System Styling === */

/* Document Status Badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
}

.status-badge.status-processing {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.status-badge.status-pending {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.status-badge.status-completed {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.status-badge.status-failed {
    background: rgba(255, 0, 0, 0.2);
    color: #ff4444;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Document Action Buttons */
.document-action-btn {
    padding: 4px 12px;
    margin: 0 4px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.document-action-btn.search {
    color: #00bcd4;
    border-color: rgba(0, 188, 212, 0.5);
}

.document-action-btn.search:hover {
    background: rgba(0, 188, 212, 0.1);
    border-color: rgba(0, 188, 212, 0.8);
    transform: translateY(-1px);
}

.document-action-btn.delete {
    color: #f44336;
    border-color: rgba(244, 67, 54, 0.5);
}

.document-action-btn.delete:hover {
    background: rgba(244, 67, 54, 0.1);
    border-color: rgba(244, 67, 54, 0.8);
    transform: translateY(-1px);
}

/* Disabled Test Button */
.document-action-btn.search.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(128, 128, 128, 0.2) !important;
    color: #888 !important;
    border-color: rgba(128, 128, 128, 0.3) !important;
}

.document-action-btn.search.disabled:hover {
    background: rgba(128, 128, 128, 0.2) !important;
    transform: none !important;
}

/* Document Item Layout */
.document-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.document-item:hover {
    border-color: rgba(0, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.document-info {
    flex: 1;
    min-width: 0;
}

.document-name {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
    word-break: break-word;
}

.document-meta {
    font-size: 0.85em;
    color: #a0a0a0;
    line-height: 1.3;
}

.document-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 12px;
}

/* Toast Notifications */
.document-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    max-width: 400px;
    z-index: 99999;
    transform: translateX(400px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.document-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.document-toast.toast-info {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    border-left: 4px solid #007bff;
}

.document-toast.toast-success {
    background: rgba(40, 167, 69, 0.9);
    color: white;
    border-left: 4px solid #28a745;
}

.document-toast.toast-error {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border-left: 4px solid #dc3545;
}

/* Search overlay for testing document search */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10200;
}

.search-modal {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80%;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 255, 255, 0.05);
}

.search-header h3 {
    margin: 0;
    color: #00ffff;
    font-size: 1.3em;
}

.close-search {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-search:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.1);
}

.search-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.search-content p {
    margin: 10px 0;
    color: #e0e0e0;
}

.search-content strong {
    color: #00ffff;
}

.search-results {
    margin-top: 20px;
}

.search-loading {
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 20px;
}

.search-results h4 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.search-result {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
}

.result-score {
    font-size: 0.85em;
    color: #00bcd4;
    font-weight: 500;
    margin-bottom: 8px;
}

.result-text {
    color: #e0e0e0;
    line-height: 1.5;
    font-size: 0.95em;
}

.no-results {
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 30px;
}

.search-error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff6b6b;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

/* Responsive adjustments for document status */
@media (max-width: 768px) {
    .document-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .document-actions {
        margin-left: 0;
        justify-content: flex-start;
    }
    
    .document-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(100px);
    }
    
    .document-toast.show {
        transform: translateY(0);
    }
    
    .search-modal {
        width: 95%;
        margin: 20px;
    }
    
    .search-header {
        padding: 15px;
    }
    
    .search-content {
        padding: 15px;
        max-height: 400px;
    }
}

/* === YouTube Video Management Styles === */
.youtube-video-list {
    max-height: 500px;
    overflow-y: auto;
    border: 2px solid rgba(0, 255, 255, 0.4);
    border-radius: 16px;
    background: rgba(0, 30, 60, 0.6);
    padding: 16px;
    margin: 0;
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.youtube-video-item {
    display: block;
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.youtube-video-item:last-child {
    margin-bottom: 0;
}

.youtube-video-item:hover {
    background: rgba(0, 255, 255, 0.12);
    border-color: rgba(0, 255, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 255, 255, 0.3);
}

.youtube-video-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.9), rgba(200, 0, 0, 0.9));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    border: 3px solid rgba(255, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.4);
    margin-bottom: 20px;
}

.youtube-video-thumbnail:hover {
    border-color: rgba(255, 0, 0, 0.8);
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 0, 0, 0.5);
}

.youtube-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 9px;
}

.youtube-video-thumbnail .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 9px;
}

.youtube-video-thumbnail:hover .play-overlay {
    opacity: 1;
}

.youtube-video-thumbnail .play-icon {
    width: 0;
    height: 0;
    border-left: 30px solid white;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    margin-left: 8px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.6));
}

.youtube-video-info {
    margin-bottom: 16px;
}

.youtube-video-title {
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 1.4em;
    line-height: 1.3;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.youtube-video-title .video-icon {
    color: #ff4444;
    font-size: 1.3em;
    flex-shrink: 0;
    margin-top: 3px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.youtube-video-meta {
    font-size: 1em;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.youtube-video-id {
    font-family: 'Courier New', monospace;
    background: rgba(255, 100, 100, 0.25);
    padding: 6px 12px;
    border-radius: 8px;
    color: #ffaaaa;
    border: 2px solid rgba(255, 100, 100, 0.5);
    font-size: 0.9em;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.youtube-video-date {
    color: #ccc;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

.youtube-video-date::before {
    content: "📅";
    font-size: 1.1em;
}

.youtube-video-description {
    font-size: 1.05em;
    color: #d0d0d0;
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid rgba(0, 255, 255, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.youtube-video-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 12px;
}

.youtube-action-btn {
    padding: 6px 12px;
    font-size: 0.8em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.2px;
    font-weight: 500;
    min-width: auto;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.youtube-action-btn.preview {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.4), rgba(255, 100, 100, 0.3));
    color: #ff8888;
    border: 2px solid rgba(255, 100, 100, 0.6);
}

.youtube-action-btn.preview:hover {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.5), rgba(255, 100, 100, 0.4));
    border-color: rgba(255, 100, 100, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(255, 100, 100, 0.5);
    color: #ffbbbb;
}

.youtube-action-btn.delete {
    background: linear-gradient(135deg, rgba(150, 50, 50, 0.4), rgba(150, 50, 50, 0.3));
    color: #ee7777;
    border: 2px solid rgba(150, 50, 50, 0.6);
}

.youtube-action-btn.delete:hover {
    background: linear-gradient(135deg, rgba(150, 50, 50, 0.5), rgba(150, 50, 50, 0.4));
    border-color: rgba(150, 50, 50, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(150, 50, 50, 0.5);
    color: #ffaaaa;
}

/* Commentary toggle button styling */
.youtube-action-btn.commentary-toggle {
    padding: 4px 8px;
    min-width: 32px;
    border-radius: 50%;
    font-size: 0.9em;
}

.youtube-action-btn.commentary-toggle.enabled {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.youtube-action-btn.commentary-toggle.enabled:hover {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.youtube-action-btn.commentary-toggle.disabled {
    background: rgba(117, 117, 117, 0.2);
    color: #757575;
    border: 1px solid rgba(117, 117, 117, 0.4);
}

.youtube-action-btn.commentary-toggle.disabled:hover {
    background: rgba(117, 117, 117, 0.3);
    border-color: rgba(117, 117, 117, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(117, 117, 117, 0.3);
}

.no-videos {
    text-align: center;
    color: #aaa;
    font-style: italic;
    padding: 60px 30px;
    margin: 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 2px dashed rgba(0, 255, 255, 0.3);
    font-size: 1.2em;
    line-height: 1.8;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .youtube-video-list {
        max-height: 450px;
        padding: 12px;
    }
    
    .youtube-video-item {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .youtube-video-thumbnail {
        height: 180px;
        margin-bottom: 16px;
    }
    
    .youtube-video-info {
        margin-bottom: 14px;
    }
    
    .youtube-video-title {
        font-size: 1.25em;
        margin-bottom: 12px;
    }
    
    .youtube-video-description {
        font-size: 1em;
        margin-bottom: 16px;
        -webkit-line-clamp: 2;
    }
    
    .youtube-video-actions {
        justify-content: space-between;
        gap: 16px;
    }
    
    .youtube-video-meta {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 0;
    }
    
    .youtube-action-btn {
        flex: 1;
        min-width: 0;
        padding: 12px 16px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .youtube-video-list {
        max-height: 400px;
        padding: 8px;
    }
    
    .youtube-video-item {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .youtube-video-thumbnail {
        height: 160px;
        margin-bottom: 14px;
    }
    
    .youtube-video-info {
        margin-bottom: 12px;
    }
    
    .youtube-video-title {
        font-size: 1.15em;
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .youtube-video-description {
        font-size: 0.95em;
        padding: 10px 12px;
    }
    
    .youtube-video-meta {
        gap: 10px;
        margin-bottom: 0;
    }
    
    .youtube-video-id {
        font-size: 0.8em;
        padding: 4px 8px;
    }
    
    .youtube-action-btn {
        padding: 12px 16px;
        font-size: 0.85em;
        font-weight: 700;
    }
    
    .no-videos {
        padding: 50px 20px;
        font-size: 1.1em;
    }
}

/* Global Loading Overlay - Prevents flash during page reload */
#global-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Highest priority - above everything */
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#global-loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* === Feature Coming Soon Overlay === */
.feature-coming-soon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: not-allowed;
    border: 1px solid rgba(255, 165, 0, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.coming-soon-text {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.9), rgba(255, 140, 0, 0.9));
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 165, 0, 0.6);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

/* Disable the checkbox when overlay is present */
.checkbox-label:has(.feature-coming-soon-overlay) input {
    pointer-events: none;
    opacity: 0.3;
}

.checkbox-label:has(.feature-coming-soon-overlay) .checkbox-text {
    opacity: 0.5;
}

.global-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.global-loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 30px;
}

.global-spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: global-spinner-rotate 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.global-spinner-ring:nth-child(1) {
    border-top-color: #00ffff;
    animation-delay: 0s;
}

.global-spinner-ring:nth-child(2) {
    border-right-color: #00ccff;
    animation-delay: 0.1s;
}

.global-spinner-ring:nth-child(3) {
    border-bottom-color: #0099ff;
    animation-delay: 0.2s;
}

.global-spinner-ring:nth-child(4) {
    border-left-color: #0066ff;
    animation-delay: 0.3s;
}

@keyframes global-spinner-rotate {
    0% {
        transform: rotate(0deg) scale(0.8);
        opacity: 1;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: rotate(360deg) scale(0.8);
        opacity: 1;
    }
}

.global-loading-text {
    color: #ffffff;
    animation: global-loading-pulse 2s ease-in-out infinite alternate;
}

.global-loading-text h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    letter-spacing: 2px;
}

.global-loading-text p {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    margin: 0;
    color: #cccccc;
    font-weight: 300;
}

@keyframes global-loading-pulse {
    0% {
        opacity: 0.8;
        transform: translateY(0px);
    }
    100% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

/* Responsive adjustments for global loading */
@media (max-width: 768px) {
    .global-loading-spinner {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }
    
    .global-loading-text h2 {
        font-size: 1.5rem;
    }
    
    .global-loading-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .global-loading-spinner {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .global-loading-text h2 {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .global-loading-text p {
        font-size: 0.9rem;
    }
}

/* Global loading overlay - initially hidden, shown by JavaScript when needed */
#global-loading-overlay {
    display: none; /* Hidden by default - JavaScript will show when appropriate */
}

/* When global loading is active, hide ALL content to prevent flash */
body.global-loading-active > *:not(#global-loading-overlay) {
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Ensure loading overlay is always visible when active */
body.global-loading-active #global-loading-overlay {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Smooth transitions when content becomes visible */
#signin-overlay,
#widget-container {
    transition: opacity 0.3s ease;
}

/* Hide global loading overlay when content is ready */
body.loading-complete #global-loading-overlay {
    display: none !important;
}

/* Hide main interface when not authenticated to prevent bleed-through */
body:not(.authenticated) #widget-container {
    display: none !important;
}

/* Ensure main interface is visible when authenticated - but respect responsive display rules */
body.authenticated #widget-container {
    display: block !important;
}

/* Override for desktop layouts */
@media (min-width: 1200px) {
    body.authenticated #widget-container {
        display: grid !important;
    }
}

/* Hide signin overlay when authenticated */
body.authenticated #signin-overlay {
    display: none !important;
}

/* ========================================
   ORGANIZATION MANAGEMENT STYLES
   ======================================== */

.org-management-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.org-switcher {
    position: relative;
    width: 100%;
}

.switcher-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.switcher-row .switcher-button {
    flex: 1;
}

.manage-button {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: var(--border-radius);
    color: var(--primary-cyan);
    cursor: pointer;
    padding: 12px;
    font-size: 1rem;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-family: inherit;
}

.manage-button:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
    transform: translateY(-1px);
}

.manage-button:active {
    transform: translateY(0);
}

.manage-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.switcher-button {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition-fast);
    text-align: left;
}

.switcher-button:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

.switcher-button:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-medium);
}

.switcher-arrow {
    font-size: 12px;
    transition: transform var(--transition-fast);
    color: var(--primary-cyan);
}

.switcher-button[aria-expanded="true"] .switcher-arrow {
    transform: rotate(180deg);
}

.switcher-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: var(--border-radius);
    backdrop-filter: blur(20px);
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
    box-shadow: var(--shadow-heavy);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.create-button {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.4);
    border-radius: var(--border-radius-small);
    color: var(--primary-cyan);
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.create-button:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: var(--glow-light);
}

.dropdown-buttons {
    display: flex;
    gap: 8px;
}

.switcher-list {
    max-height: 150px;
    overflow-y: auto;
}

.switcher-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switcher-item:last-child {
    border-bottom: none;
}

.switcher-item:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-cyan);
}

.switcher-item.active {
    background: rgba(0, 255, 255, 0.2);
    color: var(--primary-cyan);
    font-weight: 500;
}

.item-info {
    flex: 1;
}

.item-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
}

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

.item-badge {
    background: rgba(0, 255, 255, 0.3);
    color: var(--primary-cyan);
    padding: 2px 6px;
    border-radius: var(--border-radius-small);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Organization Management Modal Styles */
#org-management-modal {
    z-index: 10002 !important;
}

#org-management-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

#org-management-modal .modal-header h3 {
    margin: 0;
    color: var(--primary-cyan);
    font-size: 1.2rem;
}

#org-management-modal .modal-close-button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: var(--transition-fast);
}

#org-management-modal .modal-close-button:hover {
    color: var(--primary-cyan);
    transform: scale(1.1);
}

#org-management-modal .modal-body {
    padding: 24px;
}

#org-management-modal .form-group {
    margin-bottom: 20px;
}

#org-management-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

#org-management-modal .form-group input,
#org-management-modal .form-group textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

#org-management-modal .form-group input:focus,
#org-management-modal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

#org-management-modal .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#org-management-modal .submit-button {
    background: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    color: var(--bg-dark);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: inherit;
}

#org-management-modal .submit-button:hover {
    background: var(--primary-cyan-dark);
    box-shadow: var(--glow-medium);
    transform: translateY(-1px);
}

#org-management-modal .submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Token display integration */
.token-dashboard {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.token-balance-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.token-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.token-count {
    font-size: 0.9rem;
    color: var(--primary-cyan);
    font-weight: 600;
    text-shadow: var(--glow-light);
}

/* Invitations Modal Styles */
.invitation-modal {
    max-width: 800px;
    width: 90vw;
}

.invitation-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.invitation-tabs .tab-button {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.invitation-tabs .tab-button:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-cyan);
}

.invitation-tabs .tab-button.active {
    background: rgba(0, 255, 255, 0.2);
    color: var(--primary-cyan);
    border-color: var(--primary-cyan);
}

.invitations-section h4 {
    color: var(--primary-cyan);
    margin: 0 0 16px 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.invitation-filters {
    margin-bottom: 16px;
}

.invitation-filters select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--border-radius);
}

.invitations-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius);
}

.invitation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    transition: var(--transition-fast);
}

.invitation-item:hover {
    background: rgba(0, 255, 255, 0.05);
}

.invitation-item:last-child {
    border-bottom: none;
}

.invitation-info {
    flex: 1;
}

.invitation-title {
    font-weight: 600;
    color: var(--primary-cyan);
    margin-bottom: 4px;
}

.invitation-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.invitation-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.invitation-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.invitation-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.accept-invitation-button {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.accept-invitation-button:hover {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.decline-invitation-button {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.decline-invitation-button:hover {
    background: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
}

.cancel-invitation-button {
    background: rgba(255, 165, 0, 0.2);
    color: #ffa500;
    border: 1px solid rgba(255, 165, 0, 0.3);
}

.cancel-invitation-button:hover {
    background: rgba(255, 165, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 165, 0, 0.3);
}

.invitation-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.invitation-status.pending {
    background: rgba(255, 255, 0, 0.2);
    color: #ffff00;
    border: 1px solid rgba(255, 255, 0, 0.3);
}

.invitation-status.accepted {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.invitation-status.declined {
    background: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.invitation-status.expired {
    background: rgba(128, 128, 128, 0.2);
    color: #888;
    border: 1px solid rgba(128, 128, 128, 0.3);
}

.empty-invitations {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-invitations p {
    margin: 0;
    font-style: italic;
}

.invitations-button {
    position: relative;
}

.invitations-button .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--error-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Member Management Modal Styles */
#member-management-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

#member-management-modal .modal-header h3 {
    margin: 0;
    color: var(--primary-cyan);
    font-size: 1.2rem;
}

#member-management-modal .modal-close-button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: var(--transition-fast);
}

#member-management-modal .modal-close-button:hover {
    color: var(--primary-cyan);
    transform: scale(1.1);
}

#member-management-modal .modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

#member-management-modal h4 {
    color: var(--primary-cyan);
    margin: 0 0 16px 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding-bottom: 8px;
}

#member-management-modal #invite-member-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Members List Styles */
.members-list {
    max-height: 300px;
    overflow-y: auto;
}

.member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.member-item:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.4);
}

.member-info {
    flex: 1;
}

.member-email {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 2px;
}

.member-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.member-role.owner {
    color: var(--primary-cyan);
    font-weight: 600;
}

.member-role.admin {
    color: #ffa500;
    font-weight: 600;
}

.member-actions {
    display: flex;
    gap: 8px;
}

.member-remove-button {
    background: rgba(255, 102, 102, 0.2);
    border: 1px solid rgba(255, 102, 102, 0.4);
    border-radius: var(--border-radius-small);
    color: #ff6666;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.member-remove-button:hover {
    background: rgba(255, 102, 102, 0.3);
    box-shadow: 0 0 8px rgba(255, 102, 102, 0.3);
}

.member-remove-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-members {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-style: italic;
}

/* Form styles for member management */
#member-management-modal .form-group {
    margin-bottom: 20px;
}

#member-management-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

#member-management-modal .form-group input,
#member-management-modal .form-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.9rem;
    transition: var(--transition-normal);
}

#member-management-modal .form-group input:focus,
#member-management-modal .form-group select:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

#member-management-modal .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

#member-management-modal .submit-button {
    background: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    color: var(--bg-dark);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: inherit;
}

#member-management-modal .submit-button:hover {
    background: var(--primary-cyan-dark);
    box-shadow: var(--glow-medium);
    transform: translateY(-1px);
}

#member-management-modal .submit-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .org-management-container {
        margin: 8px 0;
        padding: 12px;
        gap: 8px;
    }
    
    .switcher-row {
        gap: 6px;
    }
    
    .switcher-button {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .manage-button {
        padding: 10px;
        min-width: 40px;
        font-size: 0.9rem;
    }
    
    .dropdown-header {
        padding: 10px 12px;
    }
    
    .switcher-item {
        padding: 10px 12px;
    }
    
    #org-management-modal .modal-body {
        padding: 16px;
    }
    
    #org-management-modal .form-actions {
        flex-direction: column;
    }
}

/* ========================================
   ADMIN CONVERSATION MANAGEMENT STYLES
   ======================================== */

/* Conversation List Cards */
.conversation-list-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    border: 1px solid #00d4ff;
    border-radius: var(--border-radius-large);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.conversation-list-card:hover {
    border-color: #00ffff;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.conversation-list-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.conversation-title {
    color: #00d4ff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.conversation-user {
    color: #ffffff;
    font-size: 0.9rem;
    margin: 0;
}

.conversation-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.conversation-stats {
    display: flex;
    gap: 16px;
    align-items: center;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-label {
    color: #00d4ff;
    font-weight: 500;
}

.conversation-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.view-conversation-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #1a1a2e;
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-conversation-btn:hover {
    background: linear-gradient(135deg, #00ffff 0%, #00ccff 100%);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

/* Conversation Detail Modal */
.conversation-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.conversation-detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.conversation-detail-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: var(--border-radius-large);
    width: 90vw;
    max-width: 800px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.conversation-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.conversation-detail-header h3 {
    margin: 0;
    color: #00d4ff;
    font-size: 1.3rem;
}

.conversation-detail-close {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.conversation-detail-close:hover {
    color: #ff5252;
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

.conversation-detail-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
}

.conversation-info {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 24px;
}

.conversation-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.conversation-message {
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--border-radius-large);
    padding: 16px;
    border-left: 4px solid;
    animation: fadeIn 0.3s ease-in-out;
}

.conversation-message.user {
    border-left-color: #00d4ff;
    margin-left: 20px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
}

.conversation-message.assistant {
    border-left-color: #00ff88;
    margin-right: 20px;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 255, 136, 0.05) 100%);
}

.conversation-message.system {
    border-left-color: #ff6b6b;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(255, 107, 107, 0.05) 100%);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.message-role {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversation-message.user .message-role {
    color: #00d4ff;
}

.conversation-message.assistant .message-role {
    color: #00ff88;
}

.conversation-message.system .message-role {
    color: #ff6b6b;
}

.message-timestamp {
    font-size: 0.8rem;
    color: #888;
    font-family: 'Courier New', monospace;
}

.message-content {
    color: #ffffff;
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Loading states */
.conversations-loading {
    text-align: center;
    padding: 40px;
    color: #b0b0b0;
}

.conversations-loading .loading-spinner {
    margin: 0 auto 16px auto;
}

/* Empty state */
.no-conversations {
    text-align: center;
    padding: 60px 20px;
    color: #888;
}

.no-conversations h4 {
    color: #00d4ff;
    margin-bottom: 12px;
}

.no-conversations p {
    margin: 0;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .conversation-detail-content {
        width: 95vw;
        height: 90vh;
    }
    
    .conversation-detail-header {
        padding: 16px 18px;
    }
    
    .conversation-detail-body {
        padding: 18px;
    }
    
    .conversation-list-card {
        padding: 16px;
    }
    
    .conversation-list-card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .conversation-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .conversation-stats {
        gap: 12px;
    }
    
    .conversation-message {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Organization billing context */
.organization-billing-context {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #00ffff33;
}

.organization-billing-context .form-row {
    margin-bottom: 12px;
}

.organization-name-display {
    font-weight: 600;
    font-size: 1.1em;
    padding: 4px 8px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.billing-explanation {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #00ffff;
}

.billing-explanation p {
    margin: 0 0 8px 0;
    color: #00ffff;
    font-weight: 500;
}

.billing-explanation ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.billing-explanation li {
    margin-bottom: 6px;
    color: #e2e8f0;
    font-size: 0.9em;
    line-height: 1.4;
}

.billing-explanation strong {
    color: #00ffff;
}

/* Enhanced balance card title */
.balance-card h4 {
    color: #00ffff;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

/* Current balance display container */
.current-balance-display {
    text-align: center;
    margin: 20px 0;
}

.balance-card {
    background: rgba(0, 255, 255, 0.08);
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto;
    max-width: 400px;
}

.balance-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.balance-amount .token-count {
    font-size: 2.2em;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
}

.balance-amount .token-label {
    font-size: 1.1em;
    color: #a0a0a0;
    font-weight: 500;
}

.balance-time {
    color: #a0a0a0;
    font-size: 0.9em;
    text-align: center;
    font-style: italic;
}

/* RBAC and Organization Management */

/* Super Admin Badge */
.super-admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: pulse-super-admin 2s infinite;
}

@keyframes pulse-super-admin {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.6);
    }
}

.context-message {
    font-size: 0.9rem;
    color: #b0b0b0;
}

.context-message strong {
    color: #ffffff;
}

.context-message em {
    color: #feca57;
    font-style: italic;
}

/* === EMBED CODE GENERATOR STYLES === */
.embed-selection-container {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.embed-selection-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.embed-selection-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: var(--border-radius-small);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.embed-selection-status .status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.embed-selection-status .status-icon {
    font-size: 1.2em;
}

.embed-selection-status .status-text {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.embed-selection-status.ready {
    background: rgba(0, 255, 170, 0.1);
    border-color: rgba(0, 255, 170, 0.3);
}

.embed-selection-status.ready .status-text {
    color: var(--success-color);
}

.embed-code-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
}

.embed-code-container .code-snippet {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    color: var(--primary-cyan-light);
    resize: vertical;
    min-height: 120px;
}

.embed-domain-notice {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-top: 20px;
}

.embed-domain-notice h6 {
    color: var(--warning-color);
    margin: 0 0 12px 0;
    font-size: 0.95em;
}

.notice-content {
    margin-bottom: 15px;
}

.notice-content p {
    margin: 0 0 10px 0;
    font-size: 0.9em;
    line-height: 1.5;
}

.notice-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.notice-content li {
    margin: 4px 0;
    font-size: 0.9em;
}

.notice-highlight {
    background: rgba(255, 165, 0, 0.15);
    padding: 8px 12px;
    border-radius: var(--border-radius-small);
    border-left: 3px solid var(--warning-color);
    margin-top: 10px;
    font-size: 0.85em !important;
}

.domain-setup-btn {
    background: linear-gradient(45deg, var(--warning-color), #ff8c00);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: var(--border-radius-small);
    font-size: 0.85em;
    cursor: pointer;
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.domain-setup-btn:hover {
    background: linear-gradient(45deg, #ff8c00, #ff7700);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    transform: translateY(-1px);
}

.api-key-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-key-input {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.copy-btn, .copy-code-btn {
    background: linear-gradient(45deg, var(--primary-cyan), var(--primary-cyan-dark));
    border: none;
    color: var(--bg-dark);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--border-radius-small);
    font-size: 0.85em;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
    flex-shrink: 0;
}

.copy-btn:hover, .copy-code-btn:hover {
    background: linear-gradient(45deg, var(--primary-cyan-dark), #009999);
    box-shadow: var(--glow-medium);
    transform: translateY(-1px);
}

/* Responsive Grid for Embed Selection */
@media (min-width: 768px) {
    .embed-selection-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .api-key-container {
        flex-direction: row;
    }
}

@media (max-width: 767px) {
    .embed-selection-container {
    padding: 15px;
}

    .embed-selection-row {
        gap: 12px;
    }
    
    .embed-code-container {
        padding: 15px;
    }
    
    .api-key-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .copy-btn, .copy-code-btn {
        width: 100%;
        justify-content: center;
    }
    
    .embed-domain-notice {
        padding: 12px;
    }
    
    .notice-content ol {
        padding-left: 16px;
    }
}

/* ========================================
   FEEDBACK MODAL SYSTEM - CLEAN IMPLEMENTATION
   ======================================== */

/* Feedback List Items - CYBERPUNK ENHANCED */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    max-height: 60vh;
    overflow-y: auto;
}

.feedback-item {
    background: var(--dark-card);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
    display: block;
}

.feedback-item:hover {
    border-color: var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    transform: translateY(-1px);
}

.feedback-item.unread {
    border-left: 4px solid var(--primary-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.15);
}

.feedback-item.unread::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-cyan), rgba(0, 255, 255, 0.5));
    box-shadow: 0 0 10px var(--primary-cyan);
}

.feedback-item-content {
    display: block;
    position: relative;
    z-index: 1;
}

.feedback-type-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
    letter-spacing: 0.3px;
    margin-bottom: 0.5rem;
}



.feedback-type-badge.bug {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.4);
}

.feedback-type-badge.feature {
    background: linear-gradient(135deg, #44ff44, #33cc33);
    color: #001100;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(68, 255, 68, 0.4);
}

.feedback-type-badge.general {
    background: linear-gradient(135deg, #4444ff, #3333cc);
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(68, 68, 255, 0.4);
}

.feedback-summary {
    margin-bottom: 0.5rem;
}

.feedback-summary-title {
    font-weight: 600;
    color: var(--primary-cyan);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.feedback-summary-text {
    color: var(--text-secondary);
    line-height: 1.4;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.feedback-status-badge {
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
    letter-spacing: 0.3px;
    margin-right: 0.5rem;
}



.feedback-status-badge.new {
    background: linear-gradient(135deg, #ffaa00, #cc8800);
    color: black;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}

.feedback-status-badge.in_progress {
    background: linear-gradient(135deg, #00aaff, #0088cc);
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.4);
}

.feedback-status-badge.resolved {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    color: black;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

.feedback-status-badge.closed {
    background: linear-gradient(135deg, #888888, #666666);
    color: white;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(136, 136, 136, 0.4);
}

.feedback-meta-info {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    align-items: center;
    flex-wrap: wrap;
}

.feedback-meta-info .priority-high {
    color: #ff4444;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 68, 68, 0.5);
}

.feedback-meta-info .priority-urgent {
    color: #ff0000;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
    animation: pulse 2s infinite;
}

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

.feedback-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Feedback Modal Overlay */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Active State */
.feedback-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.feedback-modal .modal-content {
    background: var(--bg-secondary, #2d2d2d);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

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

/* Modal Header */
.feedback-modal .modal-header {
    background: var(--bg-dark, #1a1a1a);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    padding: 20px 25px;
    position: relative;
    flex-shrink: 0;
}

.feedback-modal .modal-header h4 {
    color: var(--primary-cyan, #00ffff);
    margin: 0;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.feedback-modal .modal-close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.feedback-modal .modal-close-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-cyan, #00ffff);
}

/* Modal Body */
.feedback-modal .modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* Feedback Header Info */
.feedback-header-info {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
}

.feedback-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.feedback-type,
.feedback-status,
.feedback-priority,
.feedback-read-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.feedback-type.bug { background: #ff4444; color: white; }
.feedback-type.feature { background: #44ff44; color: black; }
.feedback-type.general { background: #4444ff; color: white; }

.feedback-status.new { background: #ffaa00; color: black; }
.feedback-status.in_progress { background: #00aaff; color: white; }
.feedback-status.resolved { background: #00ff00; color: black; }
.feedback-status.closed { background: #888888; color: white; }

.feedback-read-status.unread { background: #ff0000; color: white; }

/* Feedback Sections */
.feedback-section {
    margin-bottom: 25px;
}

.feedback-section h6 {
    color: var(--primary-cyan, #00ffff);
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feedback-message {
    background: var(--bg-dark, #1a1a1a);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    color: #ffffff;
    line-height: 1.6;
}

/* Conversation Log */
.conversation-log {
    background: var(--bg-dark, #1a1a1a);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

/* Bug Solution Content */
.bug-solution-content {
    background: var(--bg-dark, #1a1a1a);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.solution-analysis,
.solution-technical,
.agent-prompt {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 6px;
}

/* Actions */
.feedback-actions,
.solution-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.admin-button {
    padding: 10px 20px;
    border: 1px solid var(--primary-cyan, #00ffff);
    background: transparent;
    color: var(--primary-cyan, #00ffff);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.admin-button:hover {
    background: var(--primary-cyan, #00ffff);
    color: var(--bg-dark, #1a1a1a);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Status Message */
.status-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .feedback-modal .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 0;
    }
    
    .feedback-modal .modal-header,
    .feedback-modal .modal-body {
        padding: 20px;
    }
    
    .feedback-modal .modal-header h4 {
        font-size: 1.3rem;
        padding-right: 40px;
    }
    
    .feedback-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .feedback-actions,
    .solution-actions {
        flex-direction: column;
    }
    
    .admin-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .feedback-modal .modal-content {
        width: 98%;
        max-height: 98vh;
    }
    
    .feedback-modal .modal-header,
    .feedback-modal .modal-body {
        padding: 15px;
    }
    
    .feedback-modal .modal-header h4 {
        font-size: 1.2rem;
    }
    
    .feedback-section h6 {
        font-size: 1rem;
    }
}

/* CRITICAL: Override settings modal overflow to prevent clipping */
body.modal-open .settings-modal-content {
    overflow: visible;
}

/* No Projects Notice Styling */
.no-projects-notice {
    margin-top: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), rgba(0, 255, 255, 0.1));
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
}

.no-projects-notice .notice-content h6 {
    color: var(--primary-cyan);
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    text-shadow: var(--glow-light);
}

.no-projects-notice .notice-content p {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.no-projects-notice .settings-button-primary {
    background: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    color: var(--bg-dark);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-projects-notice .settings-button-primary:hover {
    background: var(--primary-cyan-light);
    border-color: var(--primary-cyan-light);
    box-shadow: var(--glow-medium);
    transform: translateY(-1px);
}

.no-projects-notice .settings-button-primary:active {
    transform: translateY(0);
    box-shadow: var(--glow-light);
}

/* Background Image Settings Styling */
.background-image-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.background-image-controls {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius);
}

.background-image-controls label {
    color: var(--primary-cyan);
    font-weight: 600;
}

.background-image-controls input[type="url"] {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--dark-card);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.background-image-controls input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

.background-preview {
    margin-top: 1rem;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    max-width: 300px;
    background: var(--dark-card);
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.background-preview img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.background-preview .preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.background-preview:hover .preview-overlay {
    opacity: 1;
}

.background-preview .preview-text {
    color: var(--primary-cyan);
    font-weight: 600;
    text-shadow: var(--glow-light);
}

/* ========================================
   ENTERPRISE FEATURES SECTION STYLES
   ======================================== */

.enterprise-features-section {
    margin: 3rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05), rgba(0, 200, 200, 0.03));
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.enterprise-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.enterprise-header h3 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-cyan-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.enterprise-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin: 0;
}

.enterprise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.enterprise-feature-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.enterprise-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-cyan-light));
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.enterprise-feature-card:hover::before {
    transform: scaleX(1);
}

.enterprise-feature-card:hover {
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.enterprise-feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-cyan);
}

.feature-tier {
    font-size: 0.85rem;
    color: var(--warning-color);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.enterprise-feature-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.enterprise-feature-card li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.2rem;
}

.enterprise-feature-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.feature-value {
    font-size: 0.9rem;
    color: var(--primary-cyan-light);
    font-style: italic;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    padding-top: 1rem;
    margin-top: 1rem;
}

.enterprise-comparison {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.comparison-header {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-header h4 {
    font-size: 1.5rem;
    margin: 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.comparison-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-item.our-solution {
    border-color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.1);
}

.comparison-item h5 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.comparison-cost {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-cyan);
    margin-bottom: 0.5rem;
}

.comparison-time {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.comparison-risk {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.comparison-vs {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--warning-color);
    text-align: center;
}

.comparison-savings {
    text-align: center;
    font-size: 1.2rem;
    color: var(--success-color);
    background: rgba(0, 255, 170, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 255, 170, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .enterprise-features-section {
        margin: 2rem 0;
        padding: 1.5rem;
    }
    
    .enterprise-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .enterprise-feature-card {
        padding: 1rem;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .comparison-vs {
        order: 2;
        margin: 1rem 0;
    }
    
    .comparison-item.our-solution {
        order: 3;
    }
}

@media (max-width: 480px) {
    .enterprise-header h3 {
        font-size: 1.5rem;
    }
    
    .enterprise-subtitle {
        font-size: 0.9rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .enterprise-feature-card h4 {
        font-size: 1.1rem;
    }
    
    .comparison-cost {
        font-size: 1.4rem;
    }
}

/* ========================================
   BACKGROUND IMAGE GALLERY STYLES
   ======================================== */

.background-image-gallery {
    background: var(--bg-darker);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    margin: var(--base-margin) 0;
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: var(--shadow-light);
    position: relative; /* Enable package gating overlay positioning */
}

/* Package gating overlay for background image gallery */
.background-image-gallery .package-gating-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    cursor: pointer;
    border: 1px solid rgba(255, 165, 0, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.background-image-gallery .package-gating-overlay .overlay-content {
    text-align: center;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    padding: 2rem;
}

.background-image-gallery .package-gating-overlay .overlay-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.background-image-gallery .package-gating-overlay .overlay-message {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.background-image-gallery .package-gating-overlay .overlay-upgrade-btn {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.9), rgba(255, 140, 0, 0.9));
    color: #ffffff;
    border: 1px solid rgba(255, 165, 0, 0.6);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
    text-decoration: none;
    display: inline-block;
}

.background-image-gallery .package-gating-overlay .overlay-upgrade-btn:hover {
    background: linear-gradient(135deg, rgba(255, 165, 0, 1), rgba(255, 140, 0, 1));
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    transform: translateY(-1px);
}

.bg-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--base-margin);
    padding-bottom: calc(var(--base-margin) / 2);
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.bg-gallery-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-cyan);
    text-shadow: var(--glow-light);
    margin: 0;
}

.btn-clear-bg {
    background: rgba(255, 102, 102, 0.1);
    border: 1px solid rgba(255, 102, 102, 0.3);
    color: #ff6666;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-clear-bg:hover {
    background: rgba(255, 102, 102, 0.2);
    border-color: #ff6666;
    box-shadow: 0 0 8px rgba(255, 102, 102, 0.3);
}

/* Upload Section */
.bg-upload-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: var(--card-padding);
    margin-bottom: var(--base-margin);
}

/* Upload tabs */
.bg-upload-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.bg-upload-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.bg-upload-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 255, 255, 0.1);
}

.bg-upload-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    font-weight: 500;
}

/* Tab content */
.bg-upload-tab-content {
    display: none;
}

.bg-upload-tab-content.active {
    display: block;
}

/* File upload specific styles */
.bg-file-input-group {
    display: flex;
    gap: var(--base-gap);
    align-items: center;
    flex-wrap: wrap;
}

.btn-choose-file,
.btn-upload-file {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-choose-file:hover,
.btn-upload-file:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-upload-file:disabled {
    background: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
}

.bg-file-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    flex: 1;
    min-width: 150px;
    padding: 8px 0;
}

.bg-upload-form {
    display: flex;
    flex-direction: column;
    gap: var(--base-gap);
}

.bg-url-input-group {
    display: flex;
    gap: var(--base-gap);
    align-items: center;
}

.bg-url-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius-small);
    padding: var(--input-padding);
    color: var(--text-primary);
    font-size: var(--input-font-size);
    transition: var(--transition-fast);
}

.bg-url-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

.btn-download-bg {
    background: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    color: var(--bg-dark);
    padding: var(--button-padding-vertical) var(--button-padding-horizontal);
    border-radius: var(--border-radius-small);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    min-width: 120px;
}

.btn-download-bg:hover {
    background: var(--primary-cyan-light);
    box-shadow: var(--glow-light);
}

.btn-download-bg:disabled {
    background: rgba(0, 255, 255, 0.3);
    border-color: rgba(0, 255, 255, 0.3);
    cursor: not-allowed;
    opacity: 0.6;
}

.bg-upload-options {
    display: flex;
    gap: var(--base-gap);
    align-items: center;
    flex-wrap: wrap;
}

.bg-name-input {
    flex: 1;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius-small);
    padding: calc(var(--input-padding) * 0.8);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.bg-name-input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

.bg-set-active-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

.bg-set-active-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.bg-upload-progress {
    margin-top: var(--base-margin);
    text-align: center;
}

.progress-bar {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-cyan-light));
    border-radius: 10px;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Gallery Grid Container */
.bg-gallery-grid-container {
    position: relative;
    min-height: 200px;
}

.bg-gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.bg-gallery-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 255, 255, 0.2);
    border-top: 3px solid var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.bg-gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
}

.bg-gallery-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.bg-gallery-empty span {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.bg-gallery-empty small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Background Gallery Placeholder */
.bg-gallery-placeholder {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    border: 1px dashed rgba(0, 255, 255, 0.3);
}

.bg-placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bg-placeholder-icon {
    font-size: 24px;
    color: var(--text-muted);
}

.bg-placeholder-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* Gallery Grid - Smaller thumbnails with at least 2 per row */
.bg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: var(--base-gap);
    padding: var(--base-margin) 0;
}

/* Responsive Grid Adjustments - Ensuring at least 2 images per row */
@media (max-width: 480px) {
    .bg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
        gap: calc(var(--base-gap) * 0.75);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .bg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .bg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }
}

@media (min-width: 1201px) {
    .bg-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Gallery Item */
.bg-gallery-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition-normal);
    cursor: pointer;
}

.bg-gallery-item:hover {
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: var(--shadow-light);
    transform: translateY(-2px);
}

/* Opacity-based Selection */
.bg-gallery-item.inactive {
    opacity: 0.6;
}

.bg-gallery-item.active {
    opacity: 1;
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

.bg-gallery-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(0, 255, 255, 0.1), 
        rgba(0, 255, 255, 0.05), 
        transparent);
    pointer-events: none;
    z-index: 1;
}

.bg-gallery-thumbnail {
    position: relative;
    width: 100%;
    height: 70px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: block;
}

.bg-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.6)
    );
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 10;
    overflow: hidden;
    box-sizing: border-box;
    pointer-events: none;
}

.bg-gallery-item:hover .bg-gallery-overlay {
    opacity: 1;
}

/* Overlay shows on hover */

.bg-gallery-actions {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    z-index: 11;
    pointer-events: auto;
}

.bg-gallery-preview,
.bg-gallery-delete {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.7rem;
    flex-shrink: 0;
    position: relative;
    z-index: 12;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.bg-gallery-preview {
    color: var(--primary-cyan);
}

.bg-gallery-preview:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--primary-cyan);
    box-shadow: var(--glow-light);
}

.bg-gallery-delete {
    color: #ff4444;
}

.bg-gallery-delete:hover {
    background: rgba(255, 102, 102, 0.2);
    border-color: #ff6666;
    box-shadow: 0 0 8px rgba(255, 102, 102, 0.3);
}

.bg-gallery-delete:disabled,
.bg-item-delete:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    background: rgba(128, 128, 128, 0.8);
    border-color: rgba(128, 128, 128, 0.8);
    color: rgba(255, 100, 100, 0.8);
}

.bg-gallery-delete:disabled:hover,
.bg-item-delete:disabled:hover {
    background: rgba(128, 128, 128, 0.2);
    border-color: rgba(128, 128, 128, 0.3);
    box-shadow: none;
}

.bg-gallery-info {
    padding: 0.5rem;
}

.bg-gallery-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bg-gallery-creator,
.bg-item-creator {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bg-gallery-status {
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--border-radius-small);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
}

.bg-gallery-status.completed {
    background: rgba(0, 255, 170, 0.2);
    color: var(--success-color);
}

.bg-gallery-status.processing {
    background: rgba(255, 165, 0, 0.2);
    color: var(--warning-color);
}

.bg-gallery-status.failed {
    background: rgba(255, 102, 102, 0.2);
    color: var(--error-color);
}

/* Preview Modal */
.bg-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.bg-preview-modal.show {
    opacity: 1;
    visibility: visible;
}

.bg-preview-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.bg-preview-content {
    position: relative;
    background: var(--bg-darker);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bg-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.bg-preview-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-cyan);
    margin: 0;
}

.bg-preview-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

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

.bg-preview-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.bg-preview-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    min-height: 400px;
    padding: 1rem;
}

.bg-preview-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.bg-preview-info {
    width: 300px;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(0, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bg-preview-name {
    font-size: 1.1rem;
    color: var(--primary-cyan);
    margin: 0;
    word-wrap: break-word;
}

.bg-preview-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bg-preview-details span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-preview-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    justify-content: flex-end;
}

.btn-preview-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-preview-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-preview-apply {
    background: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    color: var(--bg-dark);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-small);
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-preview-apply:hover {
    background: var(--primary-cyan-light);
    box-shadow: var(--glow-light);
}

.btn-preview-delete {
    background: #dc3545;
    border: 1px solid #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-preview-delete:hover {
    background: #c82333;
    border-color: #c82333;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

/* Responsive Adjustments for Modal */
@media (max-width: 768px) {
    .bg-preview-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .bg-preview-body {
        flex-direction: column;
    }
    
    .bg-preview-info {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(0, 255, 255, 0.1);
    }
    
    .bg-preview-image-container {
        min-height: 250px;
    }
    
    .bg-preview-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-preview-cancel,
    .btn-preview-delete,
    .btn-preview-apply {
        width: 100%;
    }
}

/* Upload Section Responsive */
@media (max-width: 768px) {
    .bg-url-input-group {
        flex-direction: column;
    }
    
    .btn-download-bg {
        width: 100%;
    }
    
    .bg-upload-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bg-name-input {
        min-width: auto;
    }
    
    .bg-set-active-label {
        justify-content: center;
    }
}

/* Floating Documentation Button (Top Right, positioned to the left of login) */
#floating-docs-container {
    position: fixed;
    top: 20px;
    right: 180px; /* Position to the left of the login button */
    z-index: 9999;
    display: flex;
    align-items: center;
    align-content: center;
}

#floating-docs-container.hide {
    display: none;
}

/* Floating Login Button (Top Right) */
#floating-login-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001; /* Higher than signin overlay to ensure visibility */
    display: flex;
    align-items: center;
    align-content: center;
}

/* Ensure avatar containers have relative positioning for proper layout */
#avatar-container,
#mobile-avatar-container {
    position: relative;
}

/* ========================================
   CONSOLIDATED PROFILE MANAGEMENT STYLES
   ======================================== */

/* Profile Management Actions */
.profile-management-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: 10px !important;
}

.profile-management-actions button {
    flex: 1 !important;
    padding: 8px 12px !important;
    font-size: 0.85em !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white !important;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #004085) !important;
    transform: translateY(-1px) !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62) !important;
    color: white !important;
}

.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, #545b62, #464a4e) !important;
    transform: translateY(-1px) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #a71e2a) !important;
    color: white !important;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #a71e2a, #7d1a20) !important;
    transform: translateY(-1px) !important;
}

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Quick Actions */
.quick-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.full-width {
    width: 100% !important;
}

/* Status Messages */
.status-message {
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 0.85em !important;
    margin-top: 8px !important;
    border: 1px solid transparent !important;
}

.status-message.info {
    background: rgba(23, 162, 184, 0.1) !important;
    color: #17a2b8 !important;
    border-color: rgba(23, 162, 184, 0.3) !important;
}

.status-message.success {
    background: rgba(40, 167, 69, 0.1) !important;
    color: #28a745 !important;
    border-color: rgba(40, 167, 69, 0.3) !important;
}

.status-message.error {
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
}

.status-message.warning {
    background: rgba(255, 193, 7, 0.1) !important;
    color: #ffc107 !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
}

/* Enhanced Config Sections for Consolidated Interface */
#consolidated-profile-area .config-section {
    margin-bottom: 20px !important;
}

#consolidated-profile-area .config-section h5 {
    font-size: 1.1em !important;
    margin-bottom: 10px !important;
    color: #00ffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#consolidated-profile-area .config-card {
    background: rgba(0, 255, 255, 0.05) !important;
    border: 1px solid rgba(0, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    padding: 15px !important;
}

/* Textarea Container for Voice Input */
.textarea-container {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.textarea-buttons-row {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    margin-bottom: 2px !important;
    padding-right: 2px !important;
    min-height: 20px !important;
}

.textarea-container textarea {
    flex: 1 !important;
    resize: vertical !important;
    min-height: 80px !important;
    padding: 10px !important;
}

.voice-input-btn,
.generate-prompt-btn {
    background: rgba(0, 255, 255, 0.08) !important;
    border: 1px solid rgba(0, 255, 255, 0.2) !important;
    color: rgba(0, 255, 255, 0.7) !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    font-size: 0.7em !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 20px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0.8 !important;
}

.voice-input-btn:hover,
.generate-prompt-btn:hover {
    background: rgba(0, 255, 255, 0.15) !important;
    border-color: rgba(0, 255, 255, 0.4) !important;
    color: rgba(0, 255, 255, 0.9) !important;
    opacity: 1 !important;
    transform: translateY(-1px) !important;
}

/* AI Controls Section */
.ai-controls-section {
    margin-bottom: 15px !important;
}

.checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-size: 0.9em !important;
}

.checkbox-text {
    color: #e0e0e0 !important;
}

.checkmark {
    width: 18px !important;
    height: 18px !important;
    border: 2px solid rgba(0, 255, 255, 0.5) !important;
    border-radius: 3px !important;
    position: relative !important;
    transition: all 0.2s ease !important;
}

input[type="checkbox"]:checked + .checkmark {
    background: #00ffff !important;
    border-color: #00ffff !important;
}

input[type="checkbox"]:checked + .checkmark::after {
    content: '✓' !important;
    position: absolute !important;
    top: -2px !important;
    left: 2px !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/* Help Text */
.help-text {
    font-size: 0.8em !important;
    color: #a0a0a0 !important;
    margin-top: 4px !important;
    line-height: 1.3 !important;
}

/* Responsive Adjustments for Consolidated Interface */
@media (max-width: 1199px) {
    .profile-management-actions {
        flex-direction: column !important;
    }
    
    .profile-management-actions button {
        width: 100% !important;
    }
    
    #consolidated-profile-area .config-section h5 {
        font-size: 1em !important;
    }
    
    #consolidated-profile-area .config-card {
        padding: 12px !important;
    }
}

/* Status Message Styles */
.status-message {
    margin: 10px 0 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    font-size: 0.9em !important;
    font-weight: 500 !important;
    text-align: center !important;
    min-height: 20px !important;
    line-height: 1.4 !important;
}

.status-message.info {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
    border: 1px solid #bbdefb !important;
}

.status-message.success {
    background-color: #e8f5e8 !important;
    color: #2e7d32 !important;
    border: 1px solid #c8e6c9 !important;
}

.status-message.error {
    background-color: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ffcdd2 !important;
}

.status-message.warning {
    background-color: #fff3e0 !important;
    color: #ef6c00 !important;
    border: 1px solid #ffcc02 !important;
}

/* Quick Actions Styles */
.quick-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 10px !important;
}

.quick-actions button {
    padding: 12px 16px !important;
    font-size: 0.9em !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.quick-actions button:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.quick-actions button:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.full-width {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Mobile Quick Actions */
.mobile-config-section .quick-actions {
    margin-top: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid #e0e0e0 !important;
}

.mobile-config-section .quick-actions .help-text {
    font-size: 0.8em !important;
    color: #666 !important;
    text-align: center !important;
    margin-top: 10px !important;
    line-height: 1.3 !important;
}

/* Upgrade Info Cards */
.upgrade-info-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.upgrade-icon {
    font-size: 2.5rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.upgrade-content {
    flex: 1;
}

.upgrade-content h4 {
    margin: 0 0 8px 0;
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: 600;
}

.upgrade-content p {
    margin: 4px 0;
    color: #ddd;
    font-size: 0.9rem;
    line-height: 1.4;
}

.upgrade-btn {
    display: inline-block;
    background: linear-gradient(45deg, #ffd700, #ffb347);
    color: #000;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 8px;
    transition: all 0.2s ease;
}

.upgrade-btn:hover {
    background: linear-gradient(45deg, #ffed4e, #ffc55a);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    color: #000;
    text-decoration: none;
}

/* Enhanced Button Styles */
.btn-primary.full-width {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white !important;
    font-weight: 600 !important;
}

.btn-primary.full-width:hover:not(:disabled) {
    background: linear-gradient(135deg, #0056b3, #004085) !important;
}

.btn-secondary.full-width {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
    color: white !important;
    font-weight: 600 !important;
}

.btn-secondary.full-width:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6268, #495057) !important;
}

/* Mobile Profile Status */
.mobile-config-section .status-message {
    margin: 8px 0 !important;
    font-size: 0.85em !important;
    padding: 6px 10px !important;
}

/* Profile Configuration Input Focus - Cyberpunk Theme */
#main-profile-name-input:focus,
#mobile-profile-name-input:focus,
#avatar-url-input:focus,
#mobile-avatar-url-input:focus,
#main-system-prompt-input:focus,
#mobile-system-prompt-input:focus,
#main-max-words-input:focus,
#mobile-max-words-input:focus,
#main-custom-tagline:focus,
#mobile-custom-tagline:focus,
#main-allowed-domains:focus,
#mobile-allowed-domains:focus,
#main-youtube-url-input:focus,
#mobile-youtube-url-input:focus,
#main-youtube-title-input:focus,
#mobile-youtube-title-input:focus,
#main-youtube-description-input:focus,
#mobile-youtube-description-input:focus {
    border-color: var(--primary-cyan) !important;
    box-shadow: var(--glow-light) !important;
    outline: none !important;
    background: rgba(0, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .profile-management-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .profile-management-actions button {
        width: 100% !important;
        margin: 0 !important;
    }
    
    .quick-actions {
        gap: 8px !important;
    }
    
    .quick-actions button {
        padding: 10px 12px !important;
        font-size: 0.85em !important;
    }
}

/* Help text styling */
.help-text {
    font-size: 0.8em !important;
    color: #666 !important;
    margin-top: 4px !important;
    line-height: 1.3 !important;
    display: block !important;
}

/* Consolidated profile area spacing */
#consolidated-profile-area {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 !important;
}

#consolidated-profile-area .config-section {
    margin-bottom: 0 !important;
}

#consolidated-profile-area .config-section:last-child {
    margin-bottom: 0 !important;
}

/* Create Custom Avatar Button Section */
.create-avatar-section {
    margin: 15px 0 !important;
    padding: 0 !important;
}

.create-avatar-btn {
    width: 100% !important;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #FF6B6B, #FF8E8E) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3) !important;
}

.create-avatar-btn:hover {
    background: linear-gradient(135deg, #FF8E8E, #FFB1B1) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4) !important;
}

.create-avatar-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3) !important;
}

.create-avatar-btn:focus {
    outline: 2px solid rgba(255, 107, 107, 0.5) !important;
    outline-offset: 2px !important;
}

/* Profile Configuration Group Styling */
.profile-config-group {
    background: rgba(0, 255, 255, 0.03) !important;
    border: 1px solid rgba(0, 255, 255, 0.1) !important;
    border-radius: var(--border-radius-large) !important;
    padding: var(--base-padding) !important;
    margin-bottom: calc(var(--base-margin) * 2) !important;
    position: relative !important;
    overflow: hidden !important;
}

.profile-config-group::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, var(--primary-cyan), transparent) !important;
    opacity: 0.5 !important;
}

.config-group-header {
    text-align: center !important;
    margin-bottom: calc(var(--base-margin) * 2) !important;
    padding-bottom: var(--base-padding) !important;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1) !important;
}

.config-group-header h4 {
    font-size: clamp(1.1rem, 2.5vw + 0.1rem, 2.6rem) !important;
    color: var(--primary-cyan) !important;
    margin: 0 0 0.5rem 0 !important;
    text-shadow: var(--glow-light) !important;
}

.config-group-subtitle {
    font-size: clamp(0.85rem, 1.2vw, 1.1rem) !important;
    color: var(--text-secondary) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.profile-config-group .config-section {
    margin-bottom: calc(var(--base-margin) * 1.5) !important;
}

.profile-config-group .config-section:last-child {
    margin-bottom: 0 !important;
}

.profile-actions-section {
    margin-top: calc(var(--base-margin) * 2) !important;
    padding-top: var(--base-padding) !important;
    border-top: 1px solid rgba(0, 255, 255, 0.1) !important;
}

.profile-actions-section .config-card {
    background: rgba(0, 255, 255, 0.05) !important;
    border: 1px solid rgba(0, 255, 255, 0.15) !important;
}

.profile-actions-section .help-text {
    text-align: center !important;
    font-weight: 500 !important;
    color: var(--primary-cyan-light) !important;
}

/* ========================================
   WHITELABEL SETTINGS STYLES
   ======================================== */

/* Whitelabel notice (for eligible users) */
.whitelabel-notice {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.whitelabel-notice h6 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
}

.whitelabel-notice p {
    margin: 5px 0;
    line-height: 1.4;
}

.whitelabel-notice small {
    opacity: 0.9;
    font-size: 0.85em;
}

/* Whitelabel locked notice (for non-eligible users) */
.whitelabel-locked-notice {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.whitelabel-locked-notice h6 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 600;
}

.whitelabel-locked-notice p {
    margin: 5px 0;
    line-height: 1.4;
}

.whitelabel-locked-notice ul {
    margin: 10px 0;
    padding-left: 20px;
}

.whitelabel-locked-notice li {
    margin: 5px 0;
    line-height: 1.3;
}

.whitelabel-locked-notice small {
    opacity: 0.9;
    font-size: 0.85em;
}

/* Whitelabel settings form */
.whitelabel-settings {
    padding: 10px 0;
}

.whitelabel-settings .section-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.9em;
    line-height: 1.4;
}

.whitelabel-settings .form-row {
    margin-bottom: 20px;
}

.whitelabel-settings .checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.whitelabel-settings .checkbox-group input[type="checkbox"] {
        margin: 0;
    }
    
.whitelabel-settings .checkbox-group label {
    margin: 0;
    font-weight: 500;
    color: var(--text-primary);
}

.whitelabel-settings input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--dark-card);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9em;
    font-family: inherit;
}

.whitelabel-settings input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
}

.whitelabel-settings input[type="text"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
}

/* Whitelabel preview */
.whitelabel-preview {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 15px;
}

.whitelabel-preview h6 {
    margin: 0 0 10px 0;
    color: var(--primary-cyan);
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attribution-preview {
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.8em;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.attribution-preview:empty::before {
    content: "No attribution will be shown";
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Package display styling */
#current-package-display {
    font-weight: 600;
    color: var(--warning-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .whitelabel-notice,
    .whitelabel-locked-notice {
        padding: 12px;
        font-size: 0.9em;
    }
    
    .whitelabel-notice h6,
    .whitelabel-locked-notice h6 {
        font-size: 0.95em;
    }
    
    .whitelabel-preview {
        padding: 12px;
    }
    
    .attribution-preview {
        font-size: 0.75em;
        padding: 6px 10px;
    }
}

/* ========================================
   CUSTOM AVATAR MANAGEMENT INTERFACE
   ======================================== */

/* Custom Avatar Management Interface */
.custom-avatar-list {
    display: flex;
        flex-direction: column;
        gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 255, 255, 0.1);
}

.custom-avatar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: var(--transition-fast);
}

.custom-avatar-item:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.3);
}

.custom-avatar-info {
    display: flex;
        flex-direction: column;
    flex: 1;
}

.custom-avatar-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.custom-avatar-creator {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-style: italic;
}

.custom-avatar-delete-btn {
    background: rgba(255, 102, 102, 0.2);
    border: 1px solid rgba(255, 102, 102, 0.3);
    border-radius: var(--border-radius-small);
    color: #ff6666;
    padding: 4px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.custom-avatar-delete-btn:hover {
    background: rgba(255, 102, 102, 0.4);
    border-color: rgba(255, 102, 102, 0.6);
    color: #ff9999;
    transform: scale(1.05);
}

.custom-avatar-delete-btn:active {
    transform: scale(0.98);
}

.custom-avatar-management {
    margin-top: 8px;
}

.custom-avatar-management label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

@media (max-width: 768px) {
    .custom-avatar-item {
        padding: 6px 10px;
    }
    
    .custom-avatar-name {
        font-size: 0.85rem;
    }
    
    .custom-avatar-creator {
        font-size: 0.7rem;
    }
    
    .custom-avatar-delete-btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
}

/* ========================================
   LIVE PREVIEW TEMPORARY EDITING STYLES
   ======================================== */

/* Live Preview Temporary Editing Styles */
.save-button-unsaved {
    background-color: #ff8c00 !important;
    color: white !important;
    border: 2px solid #ff6b00 !important;
    animation: pulse-orange 1.5s infinite;
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 140, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 140, 0, 0);
    }
}

/* Input with Apply Button Styles */
.input-with-apply {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-apply input,
.input-with-apply textarea {
    flex: 1;
}

.live-preview-apply-btn {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.25rem;
}

.live-preview-apply-btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.live-preview-apply-btn:active {
    background-color: #004085;
    border-color: #004085;
}

.has-unsaved-changes {
    border-left: 3px solid #ff8c00 !important;
    background-color: #2a1f0d !important;
}

.profile-status-item {
    padding: 0.5rem;
    border-radius: 4px;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-status-item.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.profile-status-item.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.profile-status-item.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.profile-status-item.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Temporary editing indicator */
.temporary-editing-indicator {
    position: fixed;
    top: 60px;
    right: 20px;
    background: rgba(255, 140, 0, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.temporary-editing-indicator::before {
    content: "🎭";
    margin-right: 0.5rem;
}

/* Session restart indicator */
.session-restart-indicator {
    background: rgba(255, 193, 7, 0.95);
    color: #856404;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-restart-indicator::before {
    content: "🔄";
}

/* Cancel button for temporary changes */
.cancel-changes-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease;
}

.cancel-changes-btn:hover {
    background: #c82333;
}

/* Live preview notifications */
.live-preview-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 123, 255, 0.95);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: slideInRight 0.3s ease;
}

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

.live-preview-notification.warning {
    background: rgba(255, 193, 7, 0.95);
    color: #856404;
}

.live-preview-notification.error {
    background: rgba(220, 53, 69, 0.95);
    color: white;
}

.live-preview-notification.success {
    background: rgba(40, 167, 69, 0.95);
    color: white;
}

/* Form field highlighting for changes */
.form-field-changed {
    border-color: #ff8c00 !important;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2) !important;
}

.form-field-changed::placeholder {
    color: #ff8c00 !important;
}

/* Responsive adjustments for live preview */
@media (max-width: 768px) {
    .temporary-editing-indicator {
        top: 50px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
    
    .live-preview-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
    
    .save-button-unsaved {
        font-weight: bold;
    }
}

/* Focus states for accessibility */
.save-button-unsaved:focus {
    outline: 2px solid #ff6b00;
    outline-offset: 2px;
}

.cancel-changes-btn:focus {
    outline: 2px solid #c82333;
    outline-offset: 2px;
}

/* ========================================
   PROFILE SWITCHING LOADING OVERLAY
   ======================================== */

/* Profile switching loading overlay - High z-index for ultimate visibility */
#profile-switching-overlay {
    position: fixed;
    top: 0;
    left: 0;
        width: 100%;
    height: 100%;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(8px);
    z-index: 99998; /* Just below notifications */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#profile-switching-overlay.show {
    opacity: 1;
    visibility: visible;
}

.profile-loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
        text-align: center;
}

.profile-loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
}

.profile-spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: profile-spinner-rotate 1.2s linear infinite;
}

.profile-spinner-ring:nth-child(1) {
    border-top-color: var(--primary-cyan);
    animation-delay: -0.45s;
    width: 120px;
    height: 120px;
}

.profile-spinner-ring:nth-child(2) {
    border-right-color: var(--primary-cyan-light);
    animation-delay: -0.3s;
    width: 100px;
    height: 100px;
    top: 10px;
    left: 10px;
}

.profile-spinner-ring:nth-child(3) {
    border-bottom-color: var(--primary-cyan-dark);
    animation-delay: -0.15s;
    width: 80px;
    height: 80px;
    top: 20px;
    left: 20px;
}

.profile-spinner-ring:nth-child(4) {
    border-left-color: var(--primary-cyan);
    animation-delay: 0s;
    width: 60px;
    height: 60px;
    top: 30px;
    left: 30px;
}

@keyframes profile-spinner-rotate {
    0% {
        transform: rotate(0deg);
        filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.3));
    }
    25% {
        filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.5));
    }
    50% {
        transform: rotate(180deg);
        filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.7));
    }
    75% {
        filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.5));
    }
    100% {
        transform: rotate(360deg);
        filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.3));
    }
}

.profile-loading-text {
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    margin-top: 1rem;
}

.profile-loading-text h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--primary-cyan);
    text-shadow: var(--glow-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
    animation: profile-loading-pulse 2s ease-in-out infinite;
}

.profile-loading-text p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.8;
    animation: profile-loading-pulse 2s ease-in-out infinite 0.5s;
}

@keyframes profile-loading-pulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Profile switching overlay animations */
.profile-switching-overlay-enter {
    opacity: 0;
    transform: scale(0.9);
}

.profile-switching-overlay-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.profile-switching-overlay-exit {
    opacity: 1;
    transform: scale(1);
}

.profile-switching-overlay-exit-active {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

/* Responsive adjustments for profile switching overlay */
@media (max-width: 768px) {
    .profile-loading-spinner {
        width: 100px;
        height: 100px;
    }
    
    .profile-spinner-ring:nth-child(1) {
        width: 100px;
        height: 100px;
    }
    
    .profile-spinner-ring:nth-child(2) {
        width: 80px;
        height: 80px;
        top: 10px;
        left: 10px;
    }
    
    .profile-spinner-ring:nth-child(3) {
        width: 60px;
        height: 60px;
        top: 20px;
        left: 20px;
    }
    
    .profile-spinner-ring:nth-child(4) {
        width: 40px;
        height: 40px;
        top: 30px;
        left: 30px;
    }
    
    .profile-loading-text h2 {
        font-size: 1.5rem;
    }
    
    .profile-loading-text p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .profile-loading-spinner {
        width: 80px;
        height: 80px;
    }
    
    .profile-spinner-ring:nth-child(1) {
        width: 80px;
        height: 80px;
    }
    
    .profile-spinner-ring:nth-child(2) {
        width: 65px;
        height: 65px;
        top: 7px;
        left: 7px;
    }
    
    .profile-spinner-ring:nth-child(3) {
        width: 50px;
        height: 50px;
        top: 15px;
        left: 15px;
    }
    
    .profile-spinner-ring:nth-child(4) {
        width: 35px;
        height: 35px;
        top: 22px;
        left: 22px;
    }
    
    .profile-loading-text h2 {
        font-size: 1.25rem;
    }
    
    .profile-loading-text p {
        font-size: 0.9rem;
    }
}

/* Prevent scrolling when overlay is active */
body.profile-switching-active {
    overflow: hidden;
}

/* Hide main interface elements when profile switching */
body.profile-switching-active #avatar-container,
body.profile-switching-active #controls-area,
body.profile-switching-active #chat-log {
    filter: blur(4px);
    pointer-events: none;
}

/* Ensure overlay appears above everything */
#profile-switching-overlay {
    pointer-events: auto;
}

body.profile-switching-active #profile-switching-overlay {
    pointer-events: auto;
}

/* For reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .profile-spinner-ring {
        animation: none;
    }
    
    .profile-loading-text h2,
    .profile-loading-text p {
        animation: none;
    }
    
    #profile-switching-overlay {
        transition: opacity 0.2s ease;
    }
    
    .profile-switching-overlay-enter-active,
    .profile-switching-overlay-exit-active {
        transition: opacity 0.2s ease;
    }
}

/* ========================================
   QUICK EMBED CODE SECTION STYLES
   ======================================== */

.quick-embed-section {
    background: rgba(0, 20, 20, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.quick-embed-section:hover {
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.15);
}

.embed-section-header {
    margin-bottom: 12px;
    text-align: center;
}

.embed-section-header h6 {
    color: #00ffff;
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

.embed-section-description {
    color: #ccc;
    font-size: 12px;
    margin: 0;
    opacity: 0.8;
}

.embed-code-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.embed-code-preview {
    position: relative;
}

.embed-code-textarea {
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.4;
    resize: vertical;
    min-height: 60px;
    max-height: 120px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s ease;
}

.embed-code-textarea:focus {
    border-color: rgba(0, 255, 255, 0.4);
}

.embed-code-textarea::placeholder {
    color: #666;
    font-style: italic;
}

.embed-code-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.copy-embed-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #00ffff, #008b8b);
    color: #000;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    justify-content: center;
}

.copy-embed-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #40e0d0, #00ced1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.3);
}

.copy-embed-btn:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.copy-embed-btn .copy-icon {
    font-size: 12px;
}

.copy-embed-btn .copy-text {
    font-size: 11px;
}

.embed-status-message {
    flex: 1;
    font-size: 10px;
    text-align: right;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.embed-status-message.show {
    opacity: 1;
}

.embed-status-message.success {
    color: #4caf50;
}

.embed-status-message.error {
    color: #f44336;
}

.embed-status-message.warning {
    color: #ff9800;
}

.embed-status-message.info {
    color: #2196f3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quick-embed-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .embed-code-textarea {
        height: 70px;
        font-size: 10px;
        padding: 6px;
    }
    
    .embed-section-header h6 {
        font-size: 13px;
    }
    
    .embed-section-description {
        font-size: 11px;
    }
    
    .copy-embed-btn {
        padding: 5px 10px;
        font-size: 10px;
    }
    
    .embed-status-message {
        font-size: 9px;
    }
}

/* Integration with existing token column styles */
.desktop-tokens-column .quick-embed-section {
    margin-bottom: 20px;
}

.desktop-tokens-column .quick-embed-section:last-child {
    margin-bottom: 0;
}

/* ========================================
   SLIDE EDITING STYLES
   ======================================== */

/* Editable sections */
.editable-section {
    position: relative;
    margin-bottom: 15px;
}

.editable-section h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* Edit buttons */
.edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.1s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.edit-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background: rgba(0, 124, 186, 0.1);
}

/* Editable content */
.editable-content {
    transition: all 0.3s ease;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    padding: 4px;
    border-radius: 4px;
}

.editable-content[contenteditable="true"] {
    outline: none;
    border: 2px dashed var(--primary-cyan) !important;
    padding: 8px !important;
    border-radius: 4px !important;
    background-color: var(--bg-darker) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.2);
}

.editable-content[contenteditable="true"]:focus {
    border-color: var(--primary-cyan-light);
    box-shadow: 0 2px 12px rgba(0, 255, 255, 0.4);
}

/* Edit controls */
.edit-controls {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.save-btn, .cancel-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.save-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.save-btn:hover {
    background: linear-gradient(135deg, #218838, #1ba085);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.cancel-btn {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #5a6268, #3d4043);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* Visual feedback for edited content */
.editable-section.has-changes {
    border-left: 4px solid #28a745;
    padding-left: 12px;
    background: rgba(40, 167, 69, 0.05);
    border-radius: 0 4px 4px 0;
}

/* Responsive adjustments for editing */
@media (max-width: 768px) {
    .edit-controls {
        flex-direction: column;
        gap: 6px;
    }
    
    .save-btn, .cancel-btn {
        width: 100%;
        justify-content: center;
    }
    
    .edit-btn {
        font-size: 16px;
        padding: 4px 6px;
    }
}

/* Presentation Mode Controls */
.presentation-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.presentation-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.presentation-actions .btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 212, 255, 0.3);
}

.presentation-actions .btn-primary:hover {
    background: linear-gradient(135deg, #00b8e6 0%, #0088bb 100%);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.presentation-actions button:not(.btn-primary):not(.btn-danger) {
    background: #34495e;
    color: #ecf0f1;
}

.presentation-actions button:not(.btn-primary):not(.btn-danger):hover {
    background: #2c3e50;
    transform: translateY(-1px);
}

.presentation-actions .btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.presentation-actions .btn-danger:hover {
    background: linear-gradient(135deg, #d62c1a 0%, #a93226 100%);
    transform: translateY(-1px);
}

/* Presentation Mode Indicator */
.presentation-mode-active {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
    animation: slideInRight 0.3s ease;
}

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


/* ==================== TOKEN TRANSFER UI STYLES ==================== */

.unified-transfer-management {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.transfer-subsection {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
}

.transfer-subsection h6 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
    font-size: 1.1em;
    font-weight: 600;
}

.transfer-subsection .section-description {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.unified-transfer-management .form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.unified-transfer-management label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9em;
}

.unified-transfer-management input,
.unified-transfer-management select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: var(--border-radius-small);
    padding: 12px;
    color: var(--text-primary);
    font-size: 1em;
    transition: all 0.3s ease;
}

.unified-transfer-management input:focus,
.unified-transfer-management select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.1);
}

.unified-transfer-management .form-actions {
    margin-top: 10px;
}

.unified-transfer-management button {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0099cc 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.transfer-input-group button {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0099cc 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-small);
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.transfer-input-group button:hover {
    background: linear-gradient(135deg, #0099cc 0%, var(--primary-color) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.3);
}

.transfer-input-group button:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.balance-info {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: var(--border-radius-small);
}

.balance-info small {
    color: var(--text-secondary);
    font-size: 0.85em;
}

#user-personal-balance {
    color: var(--primary-color);
    font-weight: 600;
}

/* Organization Bonus Admin Styles */
.admin-section .admin-help-text {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-bottom: 15px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-small);
    border-left: 3px solid var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .transfer-input-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .transfer-subsection {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .transfer-input-group button {
        padding: 10px 16px;
        font-size: 0.9em;
    }
}

