/* ============================================
   AI AUTOMATIONS - FANVUE INSPIRED UI
   Theme: White, Green (#00D4AA), Black
   ============================================ */

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary: #00D4AA;
    --primary-hover: #00B894;
    --primary-light: rgba(0, 212, 170, 0.1);
    --primary-glow: rgba(0, 212, 170, 0.3);
    
    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F0F2F5;
    --bg-dark: #1A1D21;
    --bg-darker: #141618;
    --bg-card: #FFFFFF;
    
    /* Text Colors */
    --text-primary: #1A1D21;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-light: #FFFFFF;
    
    /* Borders */
    --border-light: #E5E7EB;
    --border-medium: #D1D5DB;
    --border-dark: #374151;
    
    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Console Colors */
    --console-bg: #0D1117;
    --console-text: #C9D1D9;
    --console-green: #00D4AA;
    --console-yellow: #F0C674;
    --console-red: #CC6666;
    --console-blue: #81A2BE;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ============================================
   PROMO BANNER
   ============================================ */

.promo-banner {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);  /* Start after sidebar */
    right: 0;
    z-index: 99;  /* Below sidebar */
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: left var(--transition-normal);
}

/* When sidebar is collapsed */
.promo-banner.sidebar-collapsed {
    left: var(--sidebar-collapsed);
}

.promo-banner .promo-text {
    text-align: center;
}

.promo-banner a {
    color: #60A5FA;
    text-decoration: underline;
    font-weight: 600;
}

.promo-banner a:hover {
    color: #93C5FD;
}

/* Mobile: Full width promo banner when sidebar hidden */
@media (max-width: 768px) {
    .promo-banner {
        left: 0;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ============================================
   LAYOUT: APP STRUCTURE
   ============================================ */

.app-layout {
    display: flex;
    min-height: 100vh;
    padding-top: 40px; /* Space for promo banner */
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-primary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: width var(--transition-normal);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .profile-info,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .token-info {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 16px;
}

.sidebar.collapsed .token-section {
    padding: 12px;
    justify-content: center;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .sidebar-toggle svg {
    transform: rotate(180deg);
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-light);
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.sidebar-toggle svg {
    transition: transform var(--transition-normal);
}

/* Token Section */
.token-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin: 12px;
    background: linear-gradient(135deg, var(--primary-light), rgba(0, 212, 170, 0.05));
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.token-section:hover {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.15), rgba(0, 212, 170, 0.08));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.token-icon {
    color: var(--primary);
    flex-shrink: 0;
}

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

.token-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-balance {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.btn-add-tokens {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-add-tokens:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 12px 8px;
}

.nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 12px 0;
}

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

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

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item.active .nav-icon {
    color: white;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-text {
    flex: 1;
    white-space: nowrap;
}

.nav-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    background: var(--warning);
    color: white;
    border-radius: 10px;
    text-transform: uppercase;
}

/* NEW tag for upgraded features */
.new-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border-radius: 8px;
    text-transform: uppercase;
    margin-left: 6px;
    letter-spacing: 0.5px;
    animation: pulse-new 2s ease-in-out infinite;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

@keyframes pulse-new {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--border-light);
}

.logout-item {
    color: var(--error) !important;
}

.logout-item:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
    background: var(--bg-secondary);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed);
}

/* Content Sections */
.content-section {
    display: none;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

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

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

/* Content Header with Sub Tabs */
.content-header {
    margin-bottom: 24px;
}

.sub-tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-primary);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    width: fit-content;
}

.sub-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.sub-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sub-tab.active {
    background: var(--primary);
    color: white;
}

.tab-emoji {
    font-size: 14px;
}

/* ============================================
   WORKSPACE GRID
   ============================================ */

.workspace {
    display: grid;
    grid-template-columns: 380px 1fr 320px;
    gap: 24px;
    min-height: calc(100vh - 150px);
}

.workspace-simple {
    grid-template-columns: 400px 1fr 280px;
}

.workspace-left,
.workspace-center,
.workspace-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   CARDS
   ============================================ */

.upload-card,
.prompt-card,
.settings-card,
.status-card,
.preview-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.card-title {
    flex: 1;
}

.card-label {
    display: block;
    padding: 14px 16px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   UPLOAD AREAS
   ============================================ */

.upload-area {
    position: relative;
    min-height: 180px;
    margin: 16px;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-area.folder-mode {
    min-height: 140px;
}

/* v47.165: Detail upload area - constrain thumbnail size */
#detail-upload-area {
    overflow: hidden;
}

#detail-upload-area .reference-thumbnails {
    max-height: 180px;
    overflow-y: auto;
}

#detail-upload-area .reference-thumb {
    width: 60px;
    height: 60px;
    min-width: 60px;
    max-width: 60px;
}

.upload-card.small .upload-area {
    min-height: 80px;
    margin: 12px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    padding: 20px;
    text-align: center;
}

.upload-placeholder.small {
    padding: 12px;
}

.upload-icon {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.upload-icon.folder {
    color: #F59E0B;
}

.upload-area:hover .upload-icon {
    color: var(--primary);
}

.upload-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

.upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.upload-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    max-height: 300px;
}

.upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.upload-remove:hover {
    background: var(--error);
    transform: scale(1.1);
}

/* Video File Info Display */
.video-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    width: 100%;
}

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

.video-file-info .file-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.video-file-info .file-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-file-info .file-size {
    font-size: 12px;
    color: var(--text-muted);
}

/* Reference Thumbnails */
.reference-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    padding: 12px;
    width: 100%;
}

.reference-thumb {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.reference-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reference-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-clear {
    background: none;
    border: none;
    color: var(--error);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.btn-clear:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   PROMPT CARD
   ============================================ */

.prompt-card {
    padding: 0;
}

.prompt-card.full {
    padding: 0;
}

.prompt-textarea {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
}

.prompt-textarea:focus {
    outline: none;
}

.prompt-textarea::placeholder {
    color: var(--text-muted);
}

.prompt-hint {
    display: block;
    padding: 8px 16px 12px;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

/* ============================================
   GENERATE SECTION
   ============================================ */

.generate-section {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 16px;
}

.cost-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.cost-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.cost-tokens {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.cost-breakdown {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-generate {
    width: 100%;
    padding: 14px 24px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

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

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-icon {
    font-size: 16px;
}

.btn-cancel {
    width: 100%;
    padding: 14px 24px;
    border: 2px solid var(--error);
    background: transparent;
    color: var(--error);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 8px;
}

.btn-cancel:hover {
    background: var(--error);
    color: white;
}

/* ============================================
   PREVIEW CARD
   ============================================ */

.preview-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-area {
    flex: 1;
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    background: var(--bg-dark);
}

.preview-area.video-mode {
    background: var(--bg-darker);
}

.preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    text-align: center;
}

.preview-empty svg {
    opacity: 0.3;
}

.preview-empty span {
    font-size: 14px;
    opacity: 0.6;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    width: 100%;
    padding: 4px;
}

.results-grid.video-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.result-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-darker);
    aspect-ratio: 9/16;
}

.result-item img,
.result-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-item .result-download {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-fast);
}

.result-item:hover .result-download {
    opacity: 1;
}

.result-item .result-download:hover {
    background: var(--primary);
}

/* Mobile: Always show download buttons and make them bigger */
@media (max-width: 768px) {
    .result-item .result-download {
        opacity: 1;
        width: 44px;
        height: 44px;
        font-size: 18px;
        background: rgba(16, 185, 129, 0.9);
        bottom: 10px;
        right: 10px;
    }
    
    .result-item .result-download:active {
        transform: scale(0.95);
        background: var(--primary);
    }
    
    /* Bigger download bar buttons on mobile */
    .download-bar .btn-download {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 50px;
    }
}

/* Video loading state */
.result-item.video-loading video {
    opacity: 0.3;
}

.result-item .video-loading-spinner {
    display: none;
}

.result-item.video-loading .video-loading-spinner {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Generic spin animation for SVG icons */
svg.spin {
    animation: spin-svg 1s linear infinite;
}

@keyframes spin-svg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Ensure video shows frame when loaded */
.result-item video {
    background: #000;
}

.result-single {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* Download Bar */
.download-bar {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-dark);
    background: var(--bg-darker);
}

.btn-download {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-download:hover {
    background: var(--primary-hover);
}

.btn-download.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.btn-download.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.char-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
}

/* ============================================
   SETTINGS CARD
   ============================================ */

.settings-card {
    padding-bottom: 8px;
}

.setting-row {
    padding: 12px 16px;
}

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

.setting-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.setting-hint {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

.setting-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.setting-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: none;
}

.setting-row.inline .setting-label {
    margin-bottom: 0;
}

.setting-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.setting-row.inline .setting-select {
    width: auto;
    min-width: 150px;
}

.setting-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.setting-select:hover {
    border-color: var(--border-medium);
}

/* Ratio Buttons - v47.162 */
.ratio-buttons {
    display: flex;
    gap: 8px;
}

.ratio-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ratio-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.ratio-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Info Badge */
.info-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-sm);
    margin: 8px 0;
}

.info-badge .badge-icon {
    font-size: 16px;
}

.info-badge .badge-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Bulk Tab Content */
.bulk-tab-content {
    display: block;
}

.auto-aspect-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    font-size: 13px;
}

.auto-aspect-label {
    color: var(--text-muted);
    font-style: italic;
}

.auto-aspect-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Checkbox */
.checkbox-row {
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: 700;
}

/* ============================================
   STATUS CARD
   ============================================ */

.status-card {
    flex: 1;
}

.status-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.ready {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-dot.processing {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
    animation: pulse 1.5s infinite;
}

.status-dot.error {
    background: var(--error);
    box-shadow: 0 0 8px var(--error);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Progress Section */
.progress-section {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}

/* Console Section */
.console-section {
    border-top: 1px solid var(--border-light);
}

.console-header {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
}

.console-output {
    background: var(--console-bg);
    min-height: 150px;
    max-height: 250px;
    overflow-y: auto;
    padding: 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    line-height: 1.6;
}

.console-line {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.console-time {
    color: var(--console-text);
    opacity: 0.5;
}

.console-tag {
    font-weight: 600;
}

.console-tag.system { color: var(--console-blue); }
.console-tag.start { color: var(--console-green); }
.console-tag.process { color: var(--console-yellow); }
.console-tag.success { color: var(--console-green); }
.console-tag.error { color: var(--console-red); }
.console-tag.gemini { color: #A78BFA; }
.console-tag.config { color: var(--console-blue); }
.console-tag.info { color: var(--console-blue); }
.console-tag.warn { color: var(--console-yellow); }
.console-tag.complete { color: var(--console-green); }
.console-tag.generate { color: #60A5FA; }
.console-tag.cancel { color: var(--console-red); }

.console-msg {
    color: var(--console-text);
}

/* Feature Tips - Informative text below consoles */
.feature-tip {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    margin: 12px 16px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-left: 4px solid #10B981;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.5;
}

.feature-tip .tip-icon {
    flex-shrink: 0;
    font-size: 16px;
}

.feature-tip .tip-text {
    color: var(--text-primary);
    font-weight: 600;
}


/* ============================================
   CHARACTER TABS
   ============================================ */

.char-tab {
    display: none;
}

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

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal-box {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}

.modal-box.large {
    max-width: 900px;
    width: 95%;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-header {
    padding: 24px 24px 16px;
    text-align: center;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Subscription Box */
.subscription-box {
    margin: 0 24px 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.subscription-box.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

.subscription-box.trial {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
}

.subscription-box.expired {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
}

.sub-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.sub-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.sub-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.sub-value.active { color: var(--primary); }
.sub-value.trial { color: var(--warning); }
.sub-value.expired { color: var(--error); }

/* Unsubscribe Button */
.btn-unsubscribe {
    padding: 4px 10px;
    margin-top: 4px;
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-unsubscribe:hover {
    background: var(--error);
    color: white;
}

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

/* Packages Grid */
.packages-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 24px 16px;
}

.package-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

.package-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.package-card.featured {
    background: linear-gradient(135deg, var(--primary-light), rgba(0, 212, 170, 0.05));
    border-color: var(--primary);
}

.package-card.best-value {
    border-color: var(--success);
}

.package-card.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.package-badge {
    position: absolute;
    top: -10px;
    right: 16px;
    padding: 4px 10px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
}

.package-badge.green {
    background: var(--success);
}

.package-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.package-card p {
    font-size: 12px;
    color: var(--text-secondary);
}

.package-price {
    margin-left: auto;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.package-price small {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

/* COUPON SECTION (Buy Tokens Modal) */
.coupon-section {
    margin: 0 24px 16px;
}

.coupon-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 12px;
}

.coupon-divider::before,
.coupon-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.coupon-divider span {
    padding: 0 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-form {
    display: flex;
    gap: 8px;
}

.coupon-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

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

.coupon-input::placeholder {
    color: var(--text-muted);
}

.coupon-btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.coupon-btn:hover {
    background: var(--primary-hover);
}

.coupon-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

.coupon-message {
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
    min-height: 20px;
}

.coupon-message.success {
    color: var(--success);
}

.coupon-message.error {
    color: var(--error);
}
/* END COUPON SECTION */

.modal-warning {
    margin: 0 24px 16px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    color: var(--warning);
    font-size: 13px;
    text-align: center;
}

/* Tutorials Grid */
.tutorials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 24px 24px;
}

.tutorials-grid.single {
    grid-template-columns: 1fr;
    max-width: 640px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .tutorials-grid {
        grid-template-columns: 1fr;
    }
}

.tutorial-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.tutorial-card.featured {
    border: 1px solid var(--accent-primary);
}

.tutorial-card.coming-soon {
    opacity: 0.6;
}

.tutorial-video {
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    min-height: 180px;
}

.tutorial-card.featured .tutorial-video {
    min-height: 280px;
}

.tutorial-video-link {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-dark);
    overflow: hidden;
}

.tutorial-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tutorial-video-link:hover .tutorial-thumbnail {
    transform: scale(1.05);
}

.tutorial-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.9;
}

.tutorial-video-link:hover .tutorial-play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
}

.tutorial-play-btn svg {
    width: 68px;
    height: 48px;
}

.tutorial-video iframe {
    width: 100%;
    height: 100%;
}

.tutorial-video.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
}

.tutorial-video.placeholder svg {
    opacity: 0.3;
}

.tutorial-video.placeholder span {
    font-size: 12px;
}

.tutorial-info {
    padding: 12px;
}

.tutorial-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tutorial-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* History Empty */
.history-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.history-empty svg {
    opacity: 0.3;
    margin-bottom: 16px;
}

.history-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.history-empty p {
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1400px) {
    .workspace {
        grid-template-columns: 340px 1fr 280px;
    }
}

@media (max-width: 1200px) {
    .workspace {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .workspace-right {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */

/* Mobile menu button - hidden on desktop */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 50px; /* Below promo banner */
    left: 12px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: var(--bg-secondary);
}

.mobile-menu-btn svg {
    color: var(--text-primary);
}

/* Sidebar overlay - hidden on desktop */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 992px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Show overlay element (but hidden until sidebar opens) */
    .sidebar-overlay {
        display: block;
    }
    
    /* Overlay visible state */
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    
    /* Sidebar mobile styling */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }
    
    /* Sidebar open state */
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Main content takes full width on mobile */
    .main-content {
        margin-left: 0;
    }
    
    /* Add padding for hamburger button */
    .main-content {
        padding-top: 60px;
    }
    
    .workspace {
        grid-template-columns: 1fr;
    }
    
    .workspace-right {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    .content-section {
        padding: 16px;
    }
    
    .sub-tabs {
        width: 100%;
        overflow-x: auto;
    }
    
    .preview-area {
        min-height: 300px;
    }
    
    .modal-box {
        width: 95%;
        margin: 16px;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Console scrollbar */
.console-output::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

/* Loading state */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    padding: 24px;
}

.login-box {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-logo p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.login-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.login-tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-login {
    padding: 14px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.login-error {
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    color: var(--error);
    font-size: 13px;
    text-align: center;
}

.login-error.success {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.login-error.warning {
    background: rgba(234, 179, 8, 0.1);
    border-color: #f59e0b;
    color: #b45309;
}

.forgot-password-link {
    text-align: center;
    margin-top: 16px;
}

.forgot-password-link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.forgot-password-link a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ============================================
   TOKENS PAGE
   ============================================ */

.tokens-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 40px 24px;
}

.tokens-container {
    max-width: 600px;
    margin: 0 auto;
}

.tokens-header {
    text-align: center;
    margin-bottom: 32px;
}

.tokens-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tokens-balance-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.tokens-balance-large {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.tokens-balance-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ============================================
   ENHANCE PROMPT BUTTON
   ============================================ */

.btn-enhance-prompt {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary-light), rgba(0, 212, 170, 0.15));
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-enhance-prompt:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.btn-enhance-prompt svg {
    flex-shrink: 0;
}

/* ============================================
   HISTORY MODAL STYLES
   ============================================ */

.history-modal {
    max-width: 900px;
    max-height: 80vh;
}

.history-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.history-filter {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-filter:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.history-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.history-clear-btn {
    margin-left: auto;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    color: var(--error);
    cursor: pointer;
    font-size: 13px;
}

.history-clear-btn:hover {
    background: var(--error);
    color: white;
}

.history-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;
}

.history-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.history-thumb {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
}

.history-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-type-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.history-info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.history-prompt {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-expires {
    font-size: 11px;
    color: var(--text-muted);
}

.history-actions {
    display: flex;
    gap: 8px;
    padding: 0 10px 10px;
}

.history-action-btn {
    flex: 1;
    padding: 8px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.history-action-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.history-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.history-loading,
.history-error {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.history-empty svg {
    opacity: 0.3;
    margin-bottom: 20px;
}

.history-empty h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* Missing classes */
.btn-text {
    font-weight: 600;
}

/* ============================================
   EMAIL VERIFICATION STYLES
   ============================================ */

.verification-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 0 20px 20px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.verification-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.verification-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.verification-text {
    flex: 1;
    min-width: 200px;
}

.verification-text h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #92400e;
}

.verification-text p {
    margin: 0;
    font-size: 14px;
    color: #a16207;
}

.verification-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-resend {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-resend:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-resend:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-edit-email {
    background: white;
    color: #92400e;
    border: 1px solid #f59e0b;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-email:hover {
    background: #fef3c7;
}

/* Edit Email Modal */
.modal-small {
    max-width: 400px;
}

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

.modal-small .modal-body p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

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

.error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 8px;
}

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Verification Toast */
.verification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.verification-toast .toast-icon {
    font-size: 20px;
    font-weight: bold;
}

.verification-toast .toast-message {
    font-weight: 500;
}

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

/* Generators locked overlay */
.generator-locked {
    position: relative;
}

.generator-locked::after {
    content: '🔒 Verify email to unlock';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: inherit;
    z-index: 10;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .verification-banner {
        margin: 10px;
        padding: 16px;
    }
    
    .verification-content {
        flex-direction: column;
        text-align: center;
    }
    
    .verification-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-resend,
    .btn-edit-email {
        width: 100%;
    }
}

/* ============================================
   SUPPORT SECTION STYLES
   ============================================ */

.support-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    padding: 20px;
    max-width: 1200px;
}

.support-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
}

.support-card .support-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.support-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.support-card > p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.support-form .form-group {
    margin-bottom: 20px;
}

.support-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.support-form .form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.support-form .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.support-form .form-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.support-form select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.support-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-weight: 500;
}

.support-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.support-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-submit-support {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.btn-submit-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-submit-support:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.support-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.info-card .info-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-card ul li {
    padding: 8px 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 20px;
}

.info-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #5865F2;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-1px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.title-icon {
    font-size: 32px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .support-container {
        grid-template-columns: 1fr;
    }
    
    .support-info {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .info-card {
        flex: 1;
        min-width: 250px;
    }
}


/* ============================================
   AI VOICE - INFINITE TALK (ISOLATED STYLES)
   ============================================ */

/* New badge for nav items */
.nav-badge.new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Starterlinkk special badge - orange circle */
.nav-badge.starterlinkk-badge {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
    animation: starterlinkk-pulse 2s ease-in-out infinite;
}

.starterlinkk-btn:hover .starterlinkk-badge {
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
}

@keyframes starterlinkk-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Batch Upscale Preview Grid */
.batch-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    padding: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.batch-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
}

.batch-preview-item:hover {
    border-color: var(--accent-color);
}

.batch-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.batch-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.batch-preview-item:hover .remove-btn {
    opacity: 1;
}

.batch-count {
    text-align: center;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.batch-clear {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    cursor: pointer;
}

.card-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* Voice panel */
.voice-panel {
    display: none;
}

.voice-panel.active {
    display: block;
}

/* File upload areas */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-darker);
    transition: all var(--transition-fast);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
}

.file-upload-area .upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    cursor: pointer;
    color: var(--text-muted);
    gap: 8px;
}

.file-upload-area .upload-placeholder svg {
    opacity: 0.5;
}

.file-upload-area .upload-placeholder span {
    font-size: 13px;
}

.file-upload-area .upload-hint {
    font-size: 11px;
    opacity: 0.6;
}

.file-upload-area.small .upload-placeholder {
    padding: 12px;
}

.file-upload-area .upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    position: relative;
}

.file-upload-area .upload-preview img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.file-upload-area .upload-preview audio {
    flex: 1;
    height: 40px;
}

.file-upload-area .upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(239, 68, 68, 0.8);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-upload-area .upload-remove:hover {
    background: #ef4444;
}

/* OR divider */
.input-or-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin: 8px 0;
    position: relative;
}

.input-or-divider::before,
.input-or-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.input-or-divider::before {
    left: 0;
}

.input-or-divider::after {
    right: 0;
}

/* Required/Optional labels */
.control-label .required {
    color: #ef4444;
    font-size: 12px;
}

.control-label .optional {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
}

/* Cost display */
.cost-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 14px;
}

.cost-display .cost-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.cost-display .cost-tokens {
    color: var(--primary);
    font-weight: 600;
}

.cost-display .cost-note {
    font-size: 11px;
    color: var(--text-muted);
}


/* AI Voice - URL input section */
.url-input-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.url-divider {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: 4px 0;
}

.url-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
}

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

.url-input::placeholder {
    color: var(--text-muted);
}

/* Required badge */
.required-badge {
    font-size: 10px;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Upload preview for audio */
.upload-preview-audio {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    position: relative;
}

.upload-preview-audio audio {
    width: 100%;
    border-radius: var(--radius-sm);
}

.upload-preview-audio .upload-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Cost row in action card */
.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.cost-label {
    color: var(--text-muted);
    font-size: 13px;
}

.cost-row .cost-value {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

/* ============================================
   NANO BANANA ULTRA EDIT STYLES
   ============================================ */

/* Ultra Editor Card */
.ultra-editor-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), rgba(255, 140, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.ultra-editor-card .card-badge {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

/* Canvas Container */
.ultra-canvas-container {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ultra-canvas-wrapper {
    position: relative;
    display: none;
}

.ultra-canvas {
    display: block;
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

.ultra-mask-overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.5;
}

.ultra-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.ultra-upload-placeholder:hover {
    color: var(--primary);
    background: rgba(255, 215, 0, 0.05);
}

.ultra-upload-placeholder svg {
    margin-bottom: 12px;
    opacity: 0.6;
}

.ultra-upload-placeholder span {
    font-size: 14px;
}

.ultra-upload-placeholder .upload-hint {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 4px;
}

/* Masking Tools */
.ultra-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-top: 12px;
    align-items: center;
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tool-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

.tool-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.tool-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 8px;
}

.slider-group {
    flex: 1;
    min-width: 150px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.tool-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: var(--bg-secondary);
    border-radius: 2px;
    outline: none;
}

.tool-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-label.small {
    font-size: 12px;
}

/* Ultra Options */
.ultra-options {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* Strength Slider Control */
.slider-control {
    margin-bottom: 12px;
}

.slider-control .slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slider-control .slider-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.slider-control .slider-value {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    font-family: monospace;
}

.slider-control .slider-hints {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

.setting-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: linear-gradient(to right, var(--bg-tertiary) 0%, var(--primary) 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.setting-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    cursor: pointer;
}

/* Advanced Panel Toggle */
.btn-advanced-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    margin-top: 12px;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-advanced-toggle:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.btn-advanced-toggle.expanded svg {
    transform: rotate(180deg);
}

.btn-advanced-toggle svg {
    transition: transform 0.2s ease;
}

/* Advanced Panel */
.advanced-panel {
    padding: 12px;
    margin-top: 8px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.advanced-panel .setting-row.compact {
    margin-bottom: 8px;
}

.advanced-panel .setting-label.small {
    font-size: 11px;
}

.advanced-panel .setting-select.small {
    padding: 6px 10px;
    font-size: 12px;
}

.advanced-panel .checkbox-label.small {
    font-size: 11px;
}

.advanced-panel .checkbox-custom.small {
    width: 14px;
    height: 14px;
}

/* Ultra Settings */
.ultra-settings .setting-row {
    margin-bottom: 12px;
}

/* Prompt Actions */
.prompt-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.btn-prompt-assist {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* Ultra Generate Button */
.btn-generate.ultra-btn {
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    color: #000;
}

.btn-generate.ultra-btn:hover {
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
}

/* Compare Toggle */
.compare-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 2px;
    border-radius: 6px;
}

.compare-btn {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.compare-btn.active {
    background: var(--primary);
    color: #000;
}

/* Comparison Slider */
.compare-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.compare-slider-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.compare-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.compare-before {
    clip-path: inset(0 50% 0 0);
}

.compare-after {
    clip-path: inset(0 0 0 50%);
}

.compare-slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 4px;
    background: white;
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
}

.handle-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
}

.handle-grip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.compare-label {
    position: absolute;
    bottom: 12px;
    padding: 4px 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.before-label {
    left: 12px;
}

.after-label {
    right: 12px;
}

/* Ultra Result Container */
.ultra-result-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.ultra-result-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* Ultra Actions Bar */
.ultra-actions-bar {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    margin-top: 12px;
}

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

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

.btn-action.primary {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.btn-action.primary:hover {
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

/* Ultra Info */
.ultra-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Preview header with compare toggle */
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   ULTRA BATCH PREVIEW STYLES
   ============================================ */

.ultra-preview-area {
    min-height: 450px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.ultra-preview-area .preview-empty {
    padding: 40px 20px;
}

.preview-hint {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.5;
    margin-top: 4px;
}

/* Ultra Results Grid */
.ultra-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    width: 100%;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.ultra-results-grid::-webkit-scrollbar {
    width: 6px;
}

.ultra-results-grid::-webkit-scrollbar-track {
    background: var(--bg-darker);
    border-radius: 3px;
}

.ultra-results-grid::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

/* Result Card for batch results */
.result-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-darker);
    aspect-ratio: 9/16;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.result-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.result-card:hover img {
    transform: scale(1.05);
}

.result-card .result-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.result-card:hover .result-actions {
    opacity: 1;
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s ease;
}

.btn-icon-small:hover {
    background: var(--accent-primary);
}

/* Ultra Download Bar */
#ultra-download-bar {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

#ultra-download-bar .btn-download {
    flex: 1;
}

#ultra-download-bar .btn-download.secondary {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
}

#ultra-download-bar .btn-download.secondary:hover {
    background: var(--bg-darker);
    border-color: var(--accent-primary);
}

/* Ultra Image Count Badge */
#ultra-image-count {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--accent-primary);
    color: var(--bg-dark);
    border-radius: 10px;
    font-weight: 600;
}

/* Section Title with Badge */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-badge {
    font-size: 10px;
    padding: 3px 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-dark);
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Fix Ultra upload click handling */
#ultra-upload-area {
    cursor: pointer;
}

#ultra-upload-area .reference-thumbnails {
    pointer-events: auto;
}

#ultra-upload-area .thumb-item {
    pointer-events: auto;
}

#ultra-upload-area .thumb-remove {
    pointer-events: auto;
    z-index: 10;
}

/* Ensure placeholder is clickable */
#ultra-upload-placeholder {
    pointer-events: auto;
    cursor: pointer;
}

/* Thumb item styling for Ultra batch */
.thumb-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-darker);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    transition: transform 0.15s ease;
}

.thumb-remove:hover {
    transform: scale(1.15);
    background: rgba(239, 68, 68, 1);
}

.thumb-number {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
}

/* ============================================
   MOBILE DOWNLOAD IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Make all download/action buttons larger and more tappable */
    .btn-download,
    .char-actions button,
    .download-bar button {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 15px;
        touch-action: manipulation;
    }
    
    /* Image action buttons always visible */
    .char-actions {
        display: flex !important;
        gap: 8px;
        padding: 12px;
    }
    
    /* Preview images - tap anywhere to open */
    .result-single,
    .upload-preview,
    .preview-image,
    #char-result-image,
    #addon-result-image {
        cursor: pointer;
    }
    
    /* Toast messages - more visible on mobile */
    .verification-toast {
        font-size: 15px;
        padding: 14px 20px;
        max-width: 90%;
        text-align: center;
    }
    
    /* Bigger icons in buttons */
    .btn-download span,
    .result-download span {
        font-size: 20px;
    }
    
    /* Action buttons grid on mobile */
    .char-actions,
    .download-bar {
        flex-wrap: wrap;
    }
    
    .char-actions button,
    .download-bar button {
        flex: 1 1 45%;
        min-width: 120px;
    }
}

/* Touch feedback for all interactive elements */
@media (hover: none) {
    .btn-download:active,
    .result-download:active,
    .char-actions button:active,
    .download-bar button:active,
    .btn-generate:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
}

/* ============================================
   ONELINKK SECTION STYLES
   ============================================ */

/* Extension Banner - Large and Dominant */
.onelinkk-extension-banner {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 20px;
    padding: 32px 40px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 32px;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.onelinkk-extension-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    transform: rotate(-15deg);
    pointer-events: none;
}

.extension-banner-icon {
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
}

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

.extension-banner-content {
    flex: 1;
    color: white;
    position: relative;
    z-index: 1;
}

.extension-banner-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.extension-banner-content p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 8px 0;
    opacity: 0.95;
}

.extension-requirement {
    color: #fef3c7 !important;
    font-size: 14px !important;
    margin-top: 12px !important;
}

.extension-banner-buttons {
    display: flex;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.btn-extension-download {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
    background: white;
    color: #059669;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-extension-download:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-extension-tutorial {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-extension-tutorial:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* OneLinkk Workspace */
.onelinkk-workspace {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 24px;
}

/* Sync Status */
.onelinkk-sync-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.onelinkk-sync-status.synced {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.onelinkk-sync-status .sync-icon {
    font-size: 16px;
}

/* Save Button */
.btn-generate.onelinkk-save {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-generate.onelinkk-save:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
}

.onelinkk-save-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 10px;
}

/* Preview Header with Refresh */
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-refresh-preview {
    background: transparent;
    border: 1px solid var(--border-light);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-refresh-preview:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

/* Empty State */
.onelinkk-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
}

/* OneLinkk Preview Area - allow more images to scroll */
#onelinkk-preview-area {
    max-height: 800px;
    overflow-y: auto;
}

#onelinkk-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    width: 100%;
    padding: 4px;
}

.onelinkk-empty-icon {
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 300px;
    line-height: 1.5;
}

/* Instructions Card */
.onelinkk-instructions-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.instruction-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-top: 4px;
}

.step-content strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Stats Card */
.onelinkk-stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.stat-item {
    text-align: center;
    padding: 16px 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #10b981;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Supported Sites Card */
.onelinkk-supported-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
}

.supported-sites {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.site-tag {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.site-tag.more {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-weight: 600;
}

/* OneLinkk Mobile Responsive */
@media (max-width: 1200px) {
    .onelinkk-workspace {
        grid-template-columns: 1fr;
    }
    
    .onelinkk-extension-banner {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
    }
    
    .extension-banner-buttons {
        justify-content: center;
    }
    
    .extension-banner-content h2 {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .onelinkk-extension-banner {
        padding: 24px 20px;
        gap: 20px;
    }
    
    .extension-banner-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .extension-banner-content h2 {
        font-size: 20px;
    }
    
    .btn-extension-download,
    .btn-extension-tutorial {
        width: 100%;
        justify-content: center;
    }
    
    .extension-banner-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

/* ============================================
   TUTORIAL BUTTON & MODAL STYLES
   ============================================ */

/* Tutorial Button */
.btn-tutorial {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    margin-top: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-tutorial:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-tutorial .tutorial-icon {
    font-size: 16px;
}

.btn-tutorial .tutorial-text {
    letter-spacing: 0.5px;
}

/* Tutorial Modal */
.tutorial-modal {
    max-width: 700px;
    width: 90%;
}

.tutorial-content {
    padding: 20px !important;
    text-align: center;
}

.tutorial-video-preview {
    display: block;
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tutorial-video-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.tutorial-thumbnail-large {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: #1a1a2e;
}

.tutorial-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
}

.tutorial-video-preview:hover .tutorial-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.tutorial-hint {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .tutorial-modal {
        width: 95%;
        max-width: none;
    }
    
    .btn-tutorial {
        padding: 10px 16px;
        font-size: 13px;
    }
}
