
        :root {
            --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --ai-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 30%, #fde68a 100%);
            --ai-glow: 0 0 30px rgba(245, 158, 11, 0.5);
            --neural-gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #0ea5e9 100%);
            --dark-bg: #0f172a;
            --card-bg: rgba(255, 255, 255, 0.95);
            --glass-bg: rgba(255, 255, 255, 0.85);
            --shadow-ai: 0 25px 60px rgba(139, 92, 246, 0.25);
            --radius-xl: 25px;
            --radius-lg: 20px;
            --radius-md: 15px;
            --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Vazirmatn', sans-serif;
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            color: white;
            min-height: 100vh;
            padding: 20px;
            overflow-x: hidden;
            position: relative;
        }
        
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: 
                radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
            z-index: -1;
            animation: gradient-shift 15s ease infinite alternate;
        }
        
        @keyframes gradient-shift {
            0% { transform: translate(0, 0) scale(1); }
            100% { transform: translate(-30px, 30px) scale(1.1); }
        }
        
        .ai-particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }
        
        .ai-particle {
            position: absolute;
            background: var(--ai-gradient);
            border-radius: 50%;
            animation: float 20s linear infinite;
        }
        
        @keyframes float {
            0% { transform: translateY(0) rotate(0deg); opacity: 0; }
            10% { opacity: 1; }
            90% { opacity: 1; }
            100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }
        
        /* هدر AI ویژه */
        .ai-header {
            text-align: center;
            margin-bottom: 40px;
            padding: 30px;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: var(--radius-xl);
            border: 2px solid rgba(255, 255, 255, 0.2);
            box-shadow: var(--shadow-ai);
            position: relative;
            overflow: hidden;
        }
        
        .ai-header::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: var(--ai-gradient);
            opacity: 0.05;
           
        }
        
        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .ai-title {
            position: relative;
            z-index: 1;
        }
        
        .ai-title h1 {
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 15px;
            background: var(--ai-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-shadow: 0 5px 30px rgba(245, 158, 11, 0.3);
        }
        
        .ai-subtitle {
            font-size: 1.1rem;
            opacity: 0.9;
            margin-bottom: 20px;
        }
        
        .ai-badge-container {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-top: 20px;
            flex-wrap: wrap;
        }
        
        .ai-badge {
            background: rgba(245, 158, 11, 0.2);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(245, 158, 11, 0.3);
            padding: 10px 25px;
            border-radius: 50px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            transition: var(--transition);
        }
        
        .ai-badge:hover {
            transform: translateY(-3px);
            background: rgba(245, 158, 11, 0.3);
            box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
        }
        
        .ai-badge i {
            color: #fbbf24;
        }
        
        .ai-stats {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-top: 25px;
            flex-wrap: wrap;
        }
        
        .stat-item {
            text-align: center;
        }
        
        .stat-value {
            font-size: 2rem;
            font-weight: 800;
            background: var(--ai-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .stat-label {
            font-size: 0.9rem;
            opacity: 0.8;
            margin-top: 5px;
        }
        
        /* بخش دوربین با طراحی AI */
        .ai-camera-section {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: var(--radius-xl);
            padding: 30px;
            margin-bottom: 30px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            box-shadow: var(--shadow-ai);
            position: relative;
            overflow: hidden;
        }
        
        .section-title {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 25px;
        }
        
        .section-icon {
            width: 50px;
            height: 50px;
            background: var(--ai-gradient);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            color: white;
            box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
        }
        
        .section-title h3 {
            font-size: 1.5rem;
            font-weight: 700;
            background: var(--ai-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        .ai-camera-container {
            position: relative;
            width: 100%;
            border-radius: var(--radius-lg);
            overflow: hidden;
            background: #000;
            margin-bottom: 20px;
            border: 3px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
        }
        
        #video {
            width: 100%;
            height: 450px;
            object-fit: cover;
            display: block;
            transform: scaleX(-1);
        }
        
        .ai-crosshair {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 80px;
            height: 80px;
            border: 3px solid #fbbf24;
            border-radius: 50%;
            pointer-events: none;
            box-shadow: 
                0 0 0 3px rgba(0, 0, 0, 0.8),
                0 0 30px rgba(245, 158, 11, 0.6),
                inset 0 0 20px rgba(245, 158, 11, 0.3);
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0%, 100% { 
                box-shadow: 
                    0 0 0 3px rgba(0, 0, 0, 0.8),
                    0 0 30px rgba(245, 158, 11, 0.6),
                    inset 0 0 20px rgba(245, 158, 11, 0.3);
                border-width: 3px;
            }
            50% { 
                box-shadow: 
                    0 0 0 4px rgba(0, 0, 0, 0.8),
                    0 0 40px rgba(245, 158, 11, 0.8),
                    inset 0 0 30px rgba(245, 158, 11, 0.5);
                border-width: 4px;
            }
        }
        
        .ai-crosshair::before,
        .ai-crosshair::after {
            content: '';
            position: absolute;
            background: #fbbf24;
        }
        
        .ai-crosshair::before {
            width: 20px;
            height: 3px;
            top: 50%;
            left: -15px;
            transform: translateY(-50%);
        }
        
        .ai-crosshair::after {
            width: 3px;
            height: 20px;
            top: -15px;
            left: 50%;
            transform: translateX(-50%);
        }
        
        /* دکمه‌های AI */
        .ai-controls {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 15px;
            margin-top: 25px;
        }
        
        .ai-btn {
            padding: 16px 25px;
            border: none;
            border-radius: var(--radius-md);
            font-family: 'Vazirmatn', sans-serif;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            backdrop-filter: blur(10px);
            position: relative;
            overflow: hidden;
            min-height: 60px;
        }
        
        .ai-btn::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s;
        }
        
        .ai-btn:hover::before {
            transform: translateX(100%);
        }
        
        .ai-btn-primary {
            background: var(--ai-gradient);
            color: #7c2d12;
            box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
        }
        
        .ai-btn-primary:hover:not(:disabled) {
            transform: translateY(-5px);
            box-shadow: 0 20px 50px rgba(245, 158, 11, 0.5);
        }
        
        .ai-btn-secondary {
            background: rgba(59, 130, 246, 0.2);
            border: 2px solid rgba(59, 130, 246, 0.4);
            color: #93c5fd;
        }
        
        .ai-btn-secondary:hover:not(:disabled) {
            background: rgba(59, 130, 246, 0.3);
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(59, 130, 246, 0.3);
        }
        
        .ai-btn-danger {
            background: rgba(239, 68, 68, 0.2);
            border: 2px solid rgba(239, 68, 68, 0.4);
            color: #fca5a5;
        }
        
        .ai-btn-danger:hover:not(:disabled) {
            background: rgba(239, 68, 68, 0.3);
            transform: translateY(-5px);
            box-shadow: 0 15px 40px rgba(239, 68, 68, 0.3);
        }
        
        .ai-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }
        
        /* پردازش هوش مصنوعی */
        .ai-processing {
            display: none;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: var(--radius-md);
            padding: 20px;
            margin: 20px 0;
            border: 2px solid rgba(255, 255, 255, 0.2);
            text-align: center;
        }
        
        .neural-network {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin: 20px 0;
            flex-wrap: wrap;
        }
        
        .neuron {
            width: 20px;
            height: 20px;
            background: var(--neural-gradient);
            border-radius: 50%;
            animation: neuron-pulse 1.5s infinite;
        }
        
        @keyframes neuron-pulse {
            0%, 100% { transform: scale(1); opacity: 0.7; }
            50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 20px #8b5cf6; }
        }
        
        .progress-label {
            font-size: 1.1rem;
            margin-bottom: 10px;
            color: #fbbf24;
        }
        
        .ai-progress-bar {
            width: 100%;
            height: 10px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            overflow: hidden;
            margin: 15px 0;
        }
        
        .ai-progress-fill {
            height: 100%;
            background: var(--ai-gradient);
            border-radius: 5px;
            width: 0%;
            transition: width 0.3s ease;
        }
        
        .ai-processing-steps {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
            padding: 0 10px;
        }
        
        .processing-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            opacity: 0.5;
            transition: all 0.3s ease;
        }
        
        .processing-step.active {
            opacity: 1;
            transform: scale(1.1);
        }
        
        .step-icon {
            width: 40px;
            height: 40px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
        }
        
        .step-label {
            font-size: 0.85rem;
        }
        
        /* نتایج AI */
        .ai-results {
            display: none;
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: var(--radius-xl);
            padding: 30px;
            margin: 30px 0;
            border: 2px solid rgba(255, 255, 255, 0.2);
            box-shadow: var(--shadow-ai);
            position: relative;
            overflow: hidden;
        }
        
        .ai-results::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 5px;
            background: var(--ai-gradient);
        }
        
        .ai-color-preview {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin: 25px 0;
        }
        
        .ai-color-display {
            background: rgba(0, 0, 0, 0.3);
            border-radius: var(--radius-lg);
            padding: 25px;
            text-align: center;
            border: 2px solid rgba(255, 255, 255, 0.1);
        }
        
        .ai-color-box {
            width: 150px;
            height: 150px;
            border-radius: 20px;
            margin: 0 auto 20px;
            border: 5px solid white;
            box-shadow: 
                0 15px 40px rgba(0, 0, 0, 0.4),
                0 0 50px rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
        }
        
        .ai-color-box::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            animation: shine 3s infinite;
        }
        
        @keyframes shine {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        
        .ai-color-values {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-top: 20px;
        }
        
        .color-value-item {
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: var(--radius-md);
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .color-value-label {
            font-size: 0.9rem;
            opacity: 0.8;
            margin-bottom: 8px;
        }
        
        .color-value {
            font-size: 1.2rem;
            font-weight: 700;
            font-family: 'Courier New', monospace;
            color: #fbbf24;
        }
        
        .ai-confidence {
            background: var(--neural-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-weight: 800;
            font-size: 1.3rem;
            margin-top: 10px;
        }
        
        /* جدول نتایج AI */
        .ai-table-section {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: var(--radius-xl);
            padding: 30px;
            margin-top: 30px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            box-shadow: var(--shadow-ai);
        }
        
        .ai-table-container {
            overflow-x: auto;
            margin-top: 20px;
            border-radius: var(--radius-lg);
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(0, 0, 0, 0.2);
        }
        
        .ai-results-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 900px;
        }
        
        .ai-results-table thead {
            background: var(--ai-gradient);
        }
        
        .ai-results-table th {
            padding: 18px 12px;
            text-align: center;
            font-weight: 700;
            font-size: 0.95rem;
            color: #7c2d12;
        }
        
        .ai-results-table td {
            padding: 15px 12px;
            text-align: center;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .ai-results-table tr:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        
        .ai-color-sample {
            width: 35px;
            height: 35px;
            border-radius: 50%;
            margin: 0 auto;
            border: 2px solid white;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }
        
        .ai-delete-btn {
            background: rgba(239, 68, 68, 0.2);
            border: 1px solid rgba(239, 68, 68, 0.4);
            color: #fca5a5;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            transition: var(--transition);
            font-family: 'Vazirmatn', sans-serif;
            font-size: 0.85rem;
        }
        
        .ai-delete-btn:hover {
            background: rgba(239, 68, 68, 0.3);
            transform: translateY(-2px);
        }
        
        /* بخش خروجی AI */
        .ai-export-section {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 30px;
            flex-wrap: wrap;
        }
        
        /* انیمیشن‌های ورودی */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .fade-in {
            animation: fadeInUp 0.6s ease forwards;
        }
        
        /* موبایل */
        @media (max-width: 768px) {
            body {
                padding: 10px;
            }
            
            .ai-title h1 {
                font-size: 2rem;
            }
            
            #video {
                height: 350px;
            }
            
            .ai-controls {
                grid-template-columns: 1fr;
            }
            
            .ai-color-preview {
                grid-template-columns: 1fr;
                gap: 20px;
            }
            
            .ai-color-box {
                width: 120px;
                height: 120px;
            }
            
            .ai-color-values {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .ai-export-section {
                flex-direction: column;
            }
        }
    
