/* ============================================
   STUDENT PORTAL STYLES
   ============================================ */

/* Subject Theming CSS Custom Properties */
:root {
  --subject-bg: #2563eb;
  --subject-accent: #1d4ed8;
  --subject-light: rgba(37, 99, 235, 0.1);
  --subject-dark: #1d4ed8;
  --text-contrast: rgba(255, 255, 255, 0.85);
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow-x: hidden;
}

/* Decorative Background Shapes */
.app-container::before,
.app-container::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

/* Primary blob - top right */
.app-container::before {
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(var(--color-primary-rgb), 0.12) 0%,
    rgba(var(--color-primary-rgb), 0.04) 50%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(60px);
}

/* Secondary blob - bottom left */
.app-container::after {
  bottom: -200px;
  left: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle at 70% 70%,
    rgba(139, 92, 246, 0.1) 0%,
    rgba(249, 115, 22, 0.06) 50%,
    transparent 70%
  );
  border-radius: 50%;
  filter: blur(80px);
}



.hero {
  position: relative;
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-dark) 100%);
  background-color: var(--subject-bg);
  padding: var(--space-8) var(--space-6);
  overflow: visible;
  transition: all 0.5s ease;
}


.lang-toggle {
  position: absolute;
  top: var(--space-3);
  left: var(--space-4);
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px;
  border-radius: var(--radius-full);
  z-index: 10;
}

.lang-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: var(--font-medium);
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: white;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--subject-bg);
  font-weight: var(--font-semibold);
  transition: color 0.4s ease;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  flex-wrap: wrap;
}


.hero-branding {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: var(--space-5);
}


.hero-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}


.hero-logo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}


.hero-logo {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.hero-title-block {
  flex: 1;
}

.hero-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-white);
  margin: 0 0 var(--space-1) 0;
  line-height: 1.2;
  transition: color 0.4s ease;
}

.hero-title span {
  color: var(--color-white);
  transition: color 0.4s ease;
}

.hero-subtitle {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 420px;
  line-height: 1.5;
  transition: color 0.4s ease;
}


.hero-social {
  display: flex;
  gap: var(--space-2);
}

.hero-social .social-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.hero-social .social-icon:hover {
  background: var(--color-white);
  color: var(--color-primary);
  transform: translateY(-2px);
}


.hero-video-wrapper {
  width: 320px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  background: var(--color-gray-900);
  border: 3px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  transition: all 0.5s ease;
}

.hero-video-wrapper.expanded {
  width: calc(100vw - var(--space-12));
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: calc(100% - var(--space-12));
  flex: 0 1 100%;
  margin: var(--space-6) auto;
  border-radius: var(--radius-2xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.hero-video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-video-placeholder:hover .play-button {
  transform: scale(1.1);
  background: var(--color-accent);
}

.play-button {
  width: 56px;
  height: 56px;
  background: var(--color-primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
  transition: all 0.3s ease;
}

.play-button svg {
  width: 24px;
  height: 24px;
  color: white;
  margin-left: 3px;
}

.hero-video-placeholder span {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}


html[dir="rtl"] .lang-toggle {
  left: auto !important;
  right: var(--space-4) !important;
}



html[dir="rtl"] .hero-title-block {
  text-align: right !important;
}





.main-content {
  flex: 1;
  display: flex;
  flex-direction: row;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: var(--space-6);
  gap: var(--space-6);
}



.subjects-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  order: -1; 
}


html[dir="rtl"] .subjects-sidebar {
  order: 1 !important; 
}

html[dir="rtl"] .sidebar-header {
  text-align: right;
}

.sidebar-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: sticky;
  top: var(--space-6);
  border: 2px solid var(--color-gray-200);
  transition: all 0.3s ease;
  position: relative;
}

.sidebar-header {
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-dark) 100%);
  background-color: var(--subject-bg);
  color: var(--color-white);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s ease;
}

.sidebar-header::before {
  content: '';
  position: absolute;
  top: -10%;
  right: 5%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar-header::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: 10%;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--color-white);
  margin-bottom: var(--space-1);
  position: relative;
  z-index: 1;
  transition: all 0.2s ease;
}

.sidebar-subtitle {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  position: relative;
  z-index: 1;
}

.subjects-list {
  max-height: 500px;
  overflow-y: auto;
  padding: var(--space-3);
}

.subject-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  margin-bottom: var(--space-2);
  background: var(--color-white);
  position: relative;
  overflow: hidden;
}

.subject-item:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.subject-item.active {
  background: var(--subject-light);
  border-color: var(--subject-bg);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5), 0 4px 12px var(--subject-light);
}

.subject-item.registered {
  opacity: 0.6;
  pointer-events: none;
}

.subject-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--item-color, var(--color-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: var(--font-bold);
  font-size: var(--text-base);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
}

.subject-item:hover .subject-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.subject-info {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.subject-name {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-gray-800);
  margin-bottom: 2px;
}

.subject-meta {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
}

.subject-arrow {
  width: 20px;
  height: 20px;
  color: #9ca3af;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

.subject-item:hover .subject-arrow {
  color: var(--item-color, var(--color-primary));
  filter: drop-shadow(0 0 8px var(--item-color, var(--color-primary)));
  transform: translateX(3px);
}


html[dir="rtl"] .subject-item:hover .subject-arrow {
  transform: translateX(-3px);
}

html[dir="rtl"] .subject-info {
  text-align: right;
}


.interaction-canvas {
  flex: 1;
  order: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}


.canvas-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-16);
  text-align: center;
  border: 2px dashed var(--color-gray-200);
}


.canvas-empty.canvas-empty-minimal {
  flex-direction: row;
  padding: var(--space-6) var(--space-8);
  gap: var(--space-3);
  flex: 0;
  border-style: solid;
  border-color: var(--color-gray-100);
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.02) 0%, var(--color-white) 100%);
}

.canvas-empty-minimal .canvas-empty-icon {
  width: 24px;
  height: 24px;
  margin: 0;
  color: var(--color-primary);
  animation: pulse 2s infinite;
}

.canvas-empty-minimal .canvas-empty-hint {
  font-size: var(--text-base);
  color: var(--color-gray-600);
  font-weight: var(--font-medium);
}

.canvas-empty-icon {
  width: 100px;
  height: 100px;
  margin-bottom: var(--space-6);
  color: var(--color-gray-300);
}

.canvas-empty-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--color-gray-700);
  margin-bottom: var(--space-2);
}

.canvas-empty-text {
  font-size: var(--text-base);
  color: var(--color-gray-500);
  margin: 0;
}



.active-subject-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 2px solid var(--subject-bg);
  animation: fadeInUp var(--transition-slow) var(--ease-out);
  position: relative;
}

.active-subject-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--subject-bg), var(--subject-dark));
}

.active-subject-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.05) 0%, rgba(var(--color-primary-rgb), 0.02) 100%);
  border-bottom: 1px solid var(--subject-light);
  position: relative;
}

.active-subject-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--subject-bg), transparent);
}

.active-subject-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  box-shadow: 0 4px 16px var(--subject-light);
  transition: all 0.2s ease;
  position: relative;
}

.active-subject-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, var(--subject-bg), var(--subject-dark));
  border-radius: var(--radius-xl);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.2s ease;
}

.active-subject-icon:hover::before {
  opacity: 0.5;
  filter: blur(8px);
}

.active-subject-info {
  flex: 1;
}

.active-subject-name {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--subject-bg);
  margin-bottom: var(--space-1);
  transition: color 0.2s ease;
}

.active-subject-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.close-subject-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: var(--subject-light);
  color: var(--subject-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border: 2px solid var(--subject-bg);
  cursor: pointer;
}

.close-subject-btn:hover {
  background: var(--color-error-bg);
  color: var(--color-error);
  border-color: var(--color-error);
}


.config-bar {
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.config-field {
  flex: 1;
  min-width: 160px;
}

.config-field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--color-gray-500);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.config-field select,
.config-field input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-gray-800);
  background: var(--color-white);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.config-field select:focus,
.config-field input:focus {
  border-color: var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.config-field input[readonly] {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
  cursor: not-allowed;
}


.schedule-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--color-gray-100);
  color: var(--color-gray-400);
  border: 2px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: not-allowed;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.schedule-btn.active {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-dark) 100%);
  color: var(--color-white);
  border-color: var(--subject-dark);
  cursor: pointer;
  box-shadow: 0 4px 12px var(--subject-light);
}

.schedule-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--subject-light), 0 4px 12px var(--subject-light);
}

.schedule-btn svg {
  width: 20px;
  height: 20px;
}



.timetable-container {
  overflow: hidden;
  transition: max-height var(--transition-slower) var(--ease-in-out),
              opacity var(--transition-base) var(--ease-in-out);
}

.timetable-container.collapsed {
  max-height: 0;
  opacity: 0;
}

.timetable-container.expanded {
  max-height: 600px;
  opacity: 1;
}

.timetable-wrapper {
  padding: var(--space-6);
  padding-top: 0;
}

.timetable-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.timetable-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-gray-800);
}

.timetable-legend {
  display: flex;
  gap: var(--space-4);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-gray-500);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-sm);
}

.legend-dot.available {
  background: var(--color-success-bg);
  border: 2px solid var(--color-success);
}

.legend-dot.full {
  background: var(--color-gray-100);
  border: 2px solid var(--color-gray-300);
}

.legend-dot.selected {
  background: var(--color-primary);
}


.timetable-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr); /* 7 days: Sat-Fri */
  gap: 2px;
  background: var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.timetable-cell {
  background: var(--color-white);
  padding: var(--space-3);
  text-align: center;
  font-size: var(--text-sm);
}

.timetable-header-cell {
  background: var(--color-gray-50);
  font-weight: var(--font-semibold);
  color: var(--color-gray-700);
  padding: var(--space-4);
}

.timetable-time-cell {
  background: var(--color-gray-50);
  font-weight: var(--font-medium);
  color: var(--color-gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timetable-slot {
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
}

.timetable-slot.available {
  background: var(--color-success-bg);
}

.timetable-slot.available:hover {
  background: var(--color-success);
  color: var(--color-white);
  transform: scale(1.02);
}

.timetable-slot.full {
  background: var(--color-gray-100);
  color: var(--color-gray-400);
  cursor: not-allowed;
}

.timetable-slot.empty {
  background: var(--color-gray-50);
  color: var(--color-gray-300);
  cursor: default;
}

.timetable-slot.empty .slot-empty {
  font-size: var(--text-lg);
  color: var(--color-gray-300);
}

.timetable-slot.selected {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.3);
}

.slot-capacity {
  font-size: var(--text-xs);
  opacity: 0.8;
}

.slot-teacher {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}



.registration-form-container {
  overflow: hidden;
  transition: max-height var(--transition-slower) var(--ease-in-out),
              opacity var(--transition-base) var(--ease-in-out);
}

.registration-form-container.collapsed {
  max-height: 0;
  opacity: 0;
}

.registration-form-container.expanded {
  max-height: 1200px;
  opacity: 1;
}

.registration-form-wrapper {
  padding: var(--space-6);
  padding-top: 0;
}

.form-section-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--color-gray-800);
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.form-section-title svg {
  width: 24px;
  height: 24px;
  color: var(--subject-bg, var(--color-primary));
  transition: color 0.3s ease;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.form-grid .form-group.full-width {
  grid-column: 1 / -1;
}


.selected-schedule-summary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--subject-light, rgba(var(--color-primary-rgb), 0.05));
  border-radius: var(--radius-lg);
  border: 1px solid var(--subject-bg, rgba(var(--color-primary-rgb), 0.2));
  margin-bottom: var(--space-5);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.schedule-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--subject-bg, var(--color-primary)) 0%, var(--subject-dark, var(--color-primary-dark)) 100%);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.schedule-summary-info {
  flex: 1;
}

.schedule-summary-day {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-gray-800);
}

.schedule-summary-time {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
}

.change-schedule-btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--subject-bg, var(--color-primary));
  background: var(--color-white);
  border: 1px solid var(--subject-bg, var(--color-primary));
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.change-schedule-btn:hover {
  background: var(--subject-bg, var(--color-primary));
  color: var(--color-white);
}


.register-button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-gray-200);
  margin-top: var(--space-5);
}

/* Subject-themed submit button */
.registration-form-wrapper .btn-primary {
  background: linear-gradient(135deg, var(--subject-bg, var(--color-primary)) 0%, var(--subject-dark, var(--color-primary-dark)) 100%);
  box-shadow: var(--shadow-sm), 0 4px 14px var(--subject-light, rgba(var(--color-primary-rgb), 0.25));
  transition: all var(--transition-fast) var(--ease-in-out), background 0.3s ease;
}

.registration-form-wrapper .btn-primary:hover {
  box-shadow: var(--shadow-md), 0 6px 20px var(--subject-light, rgba(var(--color-primary-rgb), 0.35));
}

/* Subject-themed file upload area */
.registration-form-wrapper .form-file:hover .form-file-label {
  border-color: var(--subject-bg, var(--color-primary));
  background: var(--subject-light, rgba(var(--color-primary-rgb), 0.05));
}

.registration-form-wrapper .form-file-label .text strong {
  color: var(--subject-bg, var(--color-primary));
}

.form-disclaimer {
  font-size: var(--text-xs);
  color: var(--color-gray-400);
  max-width: 300px;
}

/* ============================================
   NOTES SECTION (خاص مجموعتك - Private Group)
   ============================================ */

.notes-section-wrapper {
  margin-top: var(--space-2);
}

.notes-card {
  background: linear-gradient(135deg, 
    var(--subject-light, rgba(79, 70, 229, 0.05)) 0%, 
    rgba(255, 255, 255, 0.8) 100%);
  border: 2px solid var(--subject-bg, var(--color-primary));
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.notes-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--subject-bg, var(--color-primary)) 0%, 
    var(--subject-accent, var(--color-primary-dark)) 100%);
}

.notes-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px var(--subject-light, rgba(79, 70, 229, 0.2));
}

.notes-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.notes-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--subject-bg, var(--color-primary)) 0%, var(--subject-accent, var(--color-primary-dark)) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--subject-light, rgba(79, 70, 229, 0.3));
}

.notes-label {
  font-size: var(--text-base) !important;
  font-weight: var(--font-semibold) !important;
  color: var(--subject-bg, var(--color-primary)) !important;
  margin-bottom: 0 !important;
}

.notes-textarea {
  border: 2px solid var(--color-gray-200);
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.6;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
}

.notes-textarea:focus {
  border-color: var(--subject-bg, var(--color-primary));
  box-shadow: 0 0 0 4px var(--subject-light, rgba(79, 70, 229, 0.1));
  outline: none;
}

.notes-textarea::placeholder {
  color: var(--color-gray-400);
  font-style: italic;
}

.notes-hints {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--subject-bg, var(--color-primary));
}

.notes-hints .form-help-text {
  color: var(--color-gray-600);
  font-size: var(--text-sm);
  margin: 0;
}



.registered-subjects {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.registered-subject-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  border: 1px solid var(--color-gray-100);
  animation: fadeInUp var(--transition-slow) var(--ease-out);
}

.registered-subject-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.registered-subject-icon.pending {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.registered-subject-icon.accepted {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.registered-subject-icon.rejected {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.registered-subject-info {
  flex: 1;
}

.registered-subject-name {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--color-gray-800);
  margin-bottom: var(--space-1);
}

.registered-subject-details {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-gray-500);
}

.registered-subject-status {
  margin-left: auto;
}



@media (max-width: 1200px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-video-wrapper {
    width: 100%;
    max-width: 500px;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-social {
    justify-content: center;
  }
  
  .main-content {
    flex-direction: column;
  }
  
  .subjects-sidebar {
    width: 100%;
    order: 1;
  }
  
  .sidebar-card {
    position: static;
  }
  
  .subjects-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    max-height: none;
  }
  
  .interaction-canvas {
    order: 2;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-6) var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
  }
  
  .config-bar {
    flex-direction: column;
  }
  
  .config-field {
    width: 100%;
  }
  
  .timetable-grid {
    grid-template-columns: 60px repeat(6, 1fr);
    font-size: var(--text-xs);
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}



[dir="rtl"] .form-label {
  text-align: right;
}

[dir="rtl"] .form-input,
[dir="rtl"] .form-select {
  text-align: right;
}

[dir="rtl"] .config-bar {
  flex-direction: row-reverse;
}

[dir="rtl"] .config-field {
  text-align: right;
}

[dir="rtl"] .timetable-title {
  text-align: right;
}

[dir="rtl"] .form-section-title {
  flex-direction: row-reverse;
}

[dir="rtl"] .form-disclaimer {
  text-align: right;
}

[dir="rtl"] .canvas-empty-minimal {
  flex-direction: row-reverse;
}

/* ============================================
   DECORATIVE ELEMENTS & THEMING
   ============================================ */

/* Dot pattern overlay on main content */
.main-content {
  position: relative;
  z-index: 1;
}

.main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(var(--color-primary-rgb), 0.025) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  pointer-events: none;
  z-index: -1;
}

/* Sidebar card accent shape */
.sidebar-card {
  position: relative;
  overflow: hidden;
}

.sidebar-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  transform: rotate(45deg);
  border-radius: var(--radius-2xl);
  pointer-events: none;
  z-index: 1;
}

/* Subject-themed sidebar header with smooth transition */
.sidebar-header {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-accent) 100%);
  transition: background 0.4s ease;
}

/* Subject-themed active subject styling */
.subject-item.active {
  background: var(--subject-light);
  border-color: var(--subject-bg);
}

.subject-item.active .subject-icon {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-accent) 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.active-subject-icon {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-accent) 100%) !important;
  transition: background 0.3s ease;
}

.active-subject-card {
  border-color: var(--subject-bg);
}

.schedule-btn.active {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-accent) 100%);
  border-color: var(--subject-bg);
}

/* Timetable loading state */
.timetable-grid {
  position: relative;
  transition: opacity 0.2s ease;
}

.timetable-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

.timetable-grid.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-gray-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

@keyframes slide-in-left {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ============================================
   STATIC DECORATIVE SHAPES & ELEMENTS
   ============================================ */

/* Main content decorative background grid */
.main-content {
  position: relative;
}

.main-content::before {
  content: '';
  position: fixed;
  top: 5%;
  left: 5%;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.main-content::after {
  content: '';
  position: fixed;
  bottom: 10%;
  right: 8%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

/* Hero section static decoration */
.hero {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-dark) 100%);
  background-color: var(--subject-bg);
  position: relative;
  transition: all 0.5s ease;
}

.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  right: 5%;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 10%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Interaction canvas background shapes */
.interaction-canvas {
  position: relative;
}

/* Subject card with colorful accents */
.active-subject-card {
  position: relative;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.98) 0%,
    rgba(255, 255, 255, 0.95) 100%
  );
}

.active-subject-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--subject-light) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.3;
}

/* Smooth color transitions for subject changes */
.sidebar-header,
.active-subject-icon,
.subject-icon,
.schedule-btn.active {
  transition: background 0.4s cubic-bezier(0.4, 0.0, 0.2, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}

/* Subject-themed borders and accents */
.config-bar {
  border-top: 2px solid var(--subject-light);
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 1) 0%,
    var(--subject-light) 100%
  );
  transition: border-color 0.3s ease, background 0.3s ease;
}

/* Schedule button styling with subject colors */
.schedule-btn {
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.schedule-btn:hover {
  border-color: var(--subject-bg);
  background: var(--subject-light);
  color: var(--subject-bg);
}

.schedule-btn.active {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-dark) 100%);
  color: white;
  border-color: var(--subject-dark);
  box-shadow: 0 4px 12px var(--subject-light);
}

/* Form elements theming */
.config-field select,
.config-field input {
  border-color: var(--color-gray-300);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.config-field select:focus,
.config-field input:focus {
  border-color: var(--subject-bg);
  box-shadow: 0 0 0 3px var(--subject-light);
}

/* Timetable cells with subject color accents */
.timetable-cell {
  transition: all 0.2s ease;
  border-color: var(--subject-light);
}

.timetable-cell:hover {
  border-color: var(--subject-bg);
  box-shadow: 0 0 0 2px var(--subject-light);
  background: var(--subject-light);
}

/* Badge styling with subject colors */
.badge {
  transition: all 0.2s ease;
}

.badge-info {
  background: var(--subject-light);
  color: var(--subject-bg);
  border: 1px solid var(--subject-bg);
}

/* Toast notifications with subject colors */
.toast.success {
  background: linear-gradient(135deg, var(--subject-bg) 0%, var(--subject-dark) 100%);
}

/* Dark mode adjustments for decorative elements */
@media (prefers-color-scheme: dark) {
  .app-container::before {
    opacity: 0.6;
  }
  
  .app-container::after {
    opacity: 0.5;
  }
  
  .main-content::before {
    background-image: radial-gradient(
      circle at 1px 1px,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px
    );
  }
}

/* Responsive: Reduce decorations on mobile for performance */
@media (max-width: 768px) {
  .app-container::before,
  .app-container::after {
    display: none;
  }
  
  .main-content::before {
    display: none;
  }
}

/* Video Modal Overlay */
.video-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: fadeIn 0.3s ease;
}

.video-modal-container {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  animation: scaleIn 0.3s ease;
}

.video-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.video-modal-content {
  width: 100%;
  height: 100%;
}

.video-modal-content video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
