/* Theme System - سیستم تم مدرن تک‌رنگ */
/* بر اساس الگوی جدید ساده و مدرن */

/* Import Vazirmatn Font */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

/* Base Theme Variables - متغیرهای پایه تم */
:root {
  /* Light Theme - تم روشن */
  --theme-primary: var(--color-primary-600);
  --theme-primary-light: var(--color-primary-100);
  --theme-primary-dark: var(--color-primary-800);
  --theme-primary-hover: var(--color-primary-700);

  --theme-secondary: var(--color-secondary-500);
  --theme-secondary-light: var(--color-secondary-100);
  --theme-secondary-dark: var(--color-secondary-800);

  --theme-accent: var(--color-primary-500); /* تغییر به رنگ اصلی */
  --theme-accent-light: var(--color-primary-100);
  --theme-accent-dark: var(--color-primary-700);

  /* Background Colors */
  --theme-bg: #ffffff;
  --theme-bg-secondary: var(--color-neutral-50);
  --theme-bg-tertiary: var(--color-neutral-100);
  --theme-surface: #ffffff;
  --theme-surface-hover: var(--color-neutral-100);

  /* Text Colors */
  --theme-text: var(--color-neutral-900);
  --theme-text-secondary: var(--color-neutral-600);
  --theme-text-tertiary: var(--color-neutral-500);
  --theme-text-inverse: #ffffff;

  /* Border Colors */
  --theme-border: var(--color-neutral-200);
  --theme-border-light: var(--color-neutral-100);
  --theme-border-dark: var(--color-neutral-300);

  /* Shadow Colors */
  --theme-shadow: rgba(0, 0, 0, 0.05);
  --theme-shadow-light: rgba(0, 0, 0, 0.02);
  --theme-shadow-dark: rgba(0, 0, 0, 0.1);

  /* Interactive States */
  --theme-hover: rgba(59, 130, 246, 0.05); /* آبی بسیار ملایم */
  --theme-focus: rgba(59, 130, 246, 0.1);
  --theme-active: rgba(59, 130, 246, 0.08);

  /* Status Colors */
  --theme-success: var(--color-success-500);
  --theme-error: var(--color-error-500);
  --theme-warning: var(--color-warning-500);
  --theme-info: var(--color-primary-500);

  /* Backdrop */
  --theme-backdrop: rgba(0, 0, 0, 0.5);

  /* Transitions */
  --theme-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --theme-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

  /* Border Radius */
  --theme-radius-sm: 4px;
  --theme-radius: 8px;
  --theme-radius-lg: 12px;
  --theme-radius-xl: 16px;
  --theme-radius-full: 9999px;

  /* Spacing */
  --theme-spacing-xs: 0.25rem;
  --theme-spacing-sm: 0.5rem;
  --theme-spacing: 1rem;
  --theme-spacing-lg: 1.5rem;
  --theme-spacing-xl: 2rem;
  --theme-spacing-2xl: 3rem;

  /* Typography */
  --theme-font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --theme-font-size-xs: 0.75rem;
  --theme-font-size-sm: 0.875rem;
  --theme-font-size: 1rem;
  --theme-font-size-lg: 1.125rem;
  --theme-font-size-xl: 1.25rem;
  --theme-font-size-2xl: 1.5rem;
  --theme-font-size-3xl: 1.875rem;
}

/* Dark Theme - تم تاریک */
[data-theme="dark"] {
  --theme-primary: var(--color-primary-400);
  --theme-primary-light: var(--color-primary-900);
  --theme-primary-dark: var(--color-primary-300);
  --theme-primary-hover: var(--color-primary-300);

  --theme-secondary: var(--color-secondary-400);
  --theme-secondary-light: var(--color-secondary-800);
  --theme-secondary-dark: var(--color-secondary-300);

  --theme-accent: var(--color-primary-400);
  --theme-accent-light: var(--color-primary-900);
  --theme-accent-dark: var(--color-primary-300);

  /* Background Colors */
  --theme-bg: var(--color-dark-100);
  --theme-bg-secondary: var(--color-dark-200);
  --theme-bg-tertiary: var(--color-dark-300);
  --theme-surface: var(--color-dark-200);
  --theme-surface-hover: var(--color-dark-300);

  /* Text Colors */
  --theme-text: var(--color-dark-800);
  --theme-text-secondary: var(--color-dark-600);
  --theme-text-tertiary: var(--color-dark-500);
  --theme-text-inverse: var(--color-dark-100);

  /* Border Colors */
  --theme-border: var(--color-dark-300);
  --theme-border-light: var(--color-dark-200);
  --theme-border-dark: var(--color-dark-400);

  /* Shadow Colors */
  --theme-shadow: rgba(0, 0, 0, 0.3);
  --theme-shadow-light: rgba(0, 0, 0, 0.2);
  --theme-shadow-dark: rgba(0, 0, 0, 0.4);

  /* Interactive States */
  --theme-hover: rgba(96, 165, 250, 0.15);
  --theme-focus: rgba(96, 165, 250, 0.25);
  --theme-active: rgba(96, 165, 250, 0.2);

  /* Backdrop */
  --theme-backdrop: rgba(0, 0, 0, 0.7);
}

/* Auto Dark Theme - تم تاریک خودکار */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --theme-primary: var(--color-primary-400);
    --theme-primary-light: var(--color-primary-900);
    --theme-primary-dark: var(--color-primary-300);
    --theme-primary-hover: var(--color-primary-300);

    --theme-secondary: var(--color-secondary-400);
    --theme-secondary-light: var(--color-secondary-800);
    --theme-secondary-dark: var(--color-secondary-300);

    --theme-accent: var(--color-primary-400);
    --theme-accent-light: var(--color-primary-900);
    --theme-accent-dark: var(--color-primary-300);

    --theme-bg: var(--color-dark-100);
    --theme-bg-secondary: var(--color-dark-200);
    --theme-bg-tertiary: var(--color-dark-300);
    --theme-surface: var(--color-dark-200);
    --theme-surface-hover: var(--color-dark-300);

    --theme-text: var(--color-dark-800);
    --theme-text-secondary: var(--color-dark-600);
    --theme-text-tertiary: var(--color-dark-500);
    --theme-text-inverse: var(--color-dark-100);

    --theme-border: var(--color-dark-300);
    --theme-border-light: var(--color-dark-200);
    --theme-border-dark: var(--color-dark-400);

    --theme-shadow: rgba(0, 0, 0, 0.3);
    --theme-shadow-light: rgba(0, 0, 0, 0.2);
    --theme-shadow-dark: rgba(0, 0, 0, 0.4);

    --theme-hover: rgba(96, 165, 250, 0.15);
    --theme-focus: rgba(96, 165, 250, 0.25);
    --theme-active: rgba(96, 165, 250, 0.2);

    --theme-backdrop: rgba(0, 0, 0, 0.7);
  }
}

/* Base Styles - استایل‌های پایه */
* {
  box-sizing: border-box;
}

html {
  font-family: var(--theme-font-family);
  font-size: var(--theme-font-size);
  line-height: 1.6;
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--theme-bg);
  color: var(--theme-text);
  transition: var(--theme-transition);
  min-height: 100vh;
}

/* Theme Transition Class */
.theme-transition {
  transition: var(--theme-transition);
}

.theme-transition-fast {
  transition: var(--theme-transition-fast);
}

/* Header Styles - استایل‌های هدر */
.header-component {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--theme-bg);
  border-bottom: 1px solid var(--theme-border);
  box-shadow: 0 2px 8px var(--theme-shadow-light);
  transition: var(--theme-transition);
}

.navbar {
  width: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--theme-spacing);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* Logo Styles */
.nav-logo {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--theme-text);
  font-weight: 700;
  font-size: var(--theme-font-size-xl);
  transition: var(--theme-transition);
}

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

.logo-image {
  height: 32px;
  width: auto;
  margin-left: var(--theme-spacing-sm);
}

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

/* Navigation Menu */
.desktop-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--theme-spacing-lg);
}

.nav-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--theme-text-secondary);
  font-weight: 500;
  padding: var(--theme-spacing-sm) var(--theme-spacing);
  border-radius: var(--theme-radius);
  transition: var(--theme-transition);
  position: relative;
}

.nav-link:hover {
  color: var(--theme-primary);
  background: var(--theme-hover);
  transform: translateY(-2px);
}

.nav-link.active {
  color: var(--theme-primary);
  background: var(--theme-hover);
}

/* Upload Video Menu Item Styles */
.upload-video-item {
  padding: 8px 16px;
  margin-bottom: 4px;
}

.upload-video-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--theme-primary);
  color: #ffffff !important;
  padding: 10px 16px;
  border-radius: var(--theme-radius);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.upload-video-link:hover {
  background: var(--theme-primary-hover);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
  text-decoration: none;
}

.upload-video-link i {
  color: #ffffff !important;
}

/* Dark Mode Adjustments for Upload Button */
[data-theme="dark"] .upload-video-link {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .upload-video-link:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
