/* Modern MontageStock Styles */
:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --secondary: #ec4899;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --success: #10b981;
  --danger: #ef4444;
}

[data-theme="dark"] {
  --bg: #0f172a;
  --card-bg: #1e293b;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.3);
}

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

/* Глобальные стили для всех чекбоксов и радио-кнопок */
input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

input[type="checkbox"] {
  border-radius: 4px;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: var(--primary);
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Navigation */
nav {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  box-shadow: 0 2px 8px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s, backdrop-filter 0.3s;
}

nav.scrolled {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.75) 0%, rgba(124, 58, 237, 0.75) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo a {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 0;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
  font-size: 14px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Theme Toggle */
.theme-toggle {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Notification Bell */
.nav-notification {
  position: relative;
}

.notification-bell {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  position: relative;
}

.notification-bell:hover {
  background: rgba(255, 255, 255, 0.2);
}

.notification-count {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow);
  z-index: 1000;
  display: none;
  flex-direction: column;
  max-height: 500px;
}

.notification-dropdown.show {
  display: flex;
}

.notification-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.notification-header h3 {
  margin: 0;
  font-size: 18px;
}

.notification-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.notification-item {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.3s;
}

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

.notification-item:hover {
  background: var(--bg);
}

.notification-item.unread {
  background: rgba(139, 92, 246, 0.05);
}

.notification-item.unread:hover {
  background: rgba(139, 92, 246, 0.1);
}

.notification-item h4 {
  margin: 0 0 5px 0;
  font-size: 15px;
  color: var(--primary);
}

.notification-item p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--text);
}

.notification-item small {
  font-size: 12px;
  color: var(--text-light);
}

[data-theme="dark"] .notification-dropdown {
  background: #1e293b;
  border: 1px solid #334155;
}

/* Container */
.container {
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 20px;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 20px;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 36px;
  color: var(--text);
  margin-bottom: 10px;
}

.page-header p {
  font-size: 18px;
  color: var(--text-light);
}

/* Filters Bar */
.filters-bar {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 30px;
}

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

.filter-group label {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}

.filter-group select {
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
}

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

/* Filters Sidebar */
.filters-sidebar {
  padding: 20px;
}

.filters-sidebar h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters-sidebar .filter-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.filters-sidebar .filter-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filters-sidebar .filter-section > label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
}

.filters-sidebar .checkbox-group,
.filters-sidebar .radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters-sidebar .checkbox-group label,
.filters-sidebar .radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: normal;
  margin: 0;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.2s;
  font-size: 13px;
  color: var(--text);
}

.filters-sidebar .checkbox-group label:hover,
.filters-sidebar .radio-group label:hover {
  background: var(--bg);
}

/* Custom checkboxes and radio buttons in filters */
.filters-sidebar input[type="checkbox"],
.filters-sidebar input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  flex-shrink: 0;
}

.filters-sidebar input[type="checkbox"] {
  border-radius: 4px;
}

.filters-sidebar input[type="radio"] {
  border-radius: 50%;
}

.filters-sidebar input[type="checkbox"]:hover,
.filters-sidebar input[type="radio"]:hover {
  border-color: var(--primary);
}

.filters-sidebar input[type="checkbox"]:checked,
.filters-sidebar input[type="radio"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

.filters-sidebar input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filters-sidebar input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

.filters-sidebar select {
  width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s;
}

.filters-sidebar select:hover,
.filters-sidebar select:focus {
  border-color: var(--primary);
  outline: none;
}

/* Videos Grid */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.video-card {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s;
  box-shadow: 0 2px 8px var(--shadow);
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px var(--shadow);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #000;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbnail-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 48px;
}

.duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.video-info {
  padding: 16px;
}

.video-info h3 {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.video-info h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.video-info h3 a:hover {
  color: var(--primary);
}

.video-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.video-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.upload-date {
  font-size: 12px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Watch Page */
.watch-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}

.video-player-section {
  min-width: 0;
}

.video-player {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.video-player video {
  width: 100%;
  display: block;
}

.video-details h1 {
  font-size: 24px;
  margin-bottom: 16px;
}

.video-stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.video-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.video-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.btn-action {
  padding: 10px 20px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
}

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

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

.video-description {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.video-description h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.video-description p {
  color: var(--text-light);
  line-height: 1.6;
}

.video-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tag {
  background: var(--bg);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.video-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
}

.author-details h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.author-details h4 a {
  color: var(--text);
  text-decoration: none;
}

.author-details h4 a:hover {
  color: var(--primary);
}

.author-details small {
  color: var(--text-light);
  font-size: 13px;
}

.btn-subscribe {
  padding: 10px 20px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-subscribe:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* Comments */
.comments-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.comment-form {
  margin-bottom: 24px;
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 12px;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.btn-primary {
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  padding: 12px 24px;
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment {
  display: flex;
  gap: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  margin-bottom: 4px;
}

.comment-text {
  color: var(--text);
  margin-bottom: 4px;
}

.comment-date {
  font-size: 12px;
  color: var(--text-light);
}

/* Related Videos */
.related-videos-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.related-videos {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-video-card {
  display: flex;
  gap: 12px;
  background: var(--card-bg);
  border-radius: 8px;
  padding: 8px;
  transition: all 0.3s;
  cursor: pointer;
}

.related-video-card:hover {
  background: var(--bg);
}

.related-thumbnail {
  position: relative;
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.thumbnail-placeholder-small {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
}

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

.related-info h4 {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 4px;
}

.related-info h4 a {
  color: var(--text);
  text-decoration: none;
}

.related-info h4 a:hover {
  color: var(--primary);
}

.related-info small {
  font-size: 12px;
  color: var(--text-light);
}

/* Forms */
.upload-container {
  max-width: 800px;
  margin: 0 auto;
}

.upload-container h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.upload-container p {
  color: var(--text-light);
  margin-bottom: 24px;
}

/* Form Styles */
.form-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 30px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h2 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 10px;
}

.form-header p {
  color: var(--text-light);
  font-size: 16px;
}

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

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

/* Global input styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  background: var(--card-bg);
  color: var(--text);
  transition: all 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="url"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder,
select::placeholder {
  color: var(--text-light);
}

/* Custom Checkboxes and Radios */
.custom-checkbox, .custom-radio {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
}

.custom-checkbox input, .custom-radio input {
  margin: 0;
}

.custom-checkbox label, .custom-radio label {
  cursor: pointer;
  font-weight: normal;
  margin: 0;
  color: var(--text);
}

/* Textarea */
textarea {
  min-height: 100px;
  resize: vertical;
}

/* File input */
input[type="file"] {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--bg);
}

input[type="file"]:hover {
  border-color: var(--primary);
  background: var(--card-bg);
}

input[type="file"]::file-selector-button {
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

input[type="file"]::file-selector-button:hover {
  background: var(--primary-dark);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.form-link {
  text-align: center;
  margin-top: 20px;
  color: var(--text-light);
}

.form-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.form-link a:hover {
  text-decoration: underline;
}

/* Search Input Group */
.search-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.search-input-group input {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
}

.search-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.search-input-group input::placeholder {
  color: var(--text-light);
}

/* Search */
.search-container h1 {
  font-size: 28px;
  margin-bottom: 20px;
}

.search-filters {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
}

.profile-info h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-light);
}

.profile-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.profile-videos h2 {
  font-size: 24px;
  margin-bottom: 24px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  color: var(--border);
}

.empty-state p {
  font-size: 16px;
}

.empty-state a {
  color: var(--primary);
  text-decoration: underline;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: var(--text-light);
}

/* Flashes */
.flashes {
  list-style: none;
  margin-bottom: 20px;
}

.flashes li {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Main layout */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  flex: 1;
}

/* Footer */
footer {
  background: #1e293b; /* Темно-синий цвет, как в светлой теме */
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

footer p {
  margin: 0;
}

/* Dashboard Styles */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.dashboard-header h1 {
  font-size: 32px;
  margin: 0;
}

.user-info-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 30px;
}

.user-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
}

.user-details h2 {
  font-size: 24px;
  margin: 0 0 10px 0;
}

.user-details p {
  margin: 5px 0;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px var(--shadow);
  text-align: center;
}

.stat-card .stat-number {
  font-size: 32px;
  font-weight: bold;
  color: var(--primary);
  margin: 10px 0;
}

.stat-card .stat-label {
  color: var(--text-light);
  font-size: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px 0 20px 0;
  flex-wrap: wrap;
  gap: 15px;
}

.section-header h2 {
  font-size: 24px;
  margin: 0;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.profile-form {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 30px;
}

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

.profile-form .form-actions {
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .watch-container {
    grid-template-columns: 1fr;
  }
  
  .related-videos-section {
    order: -1;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-links {
    width: 100%;
    justify-content: center;
  }
  
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .page-header h1 {
    font-size: 28px;
  }
  
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input-group {
    flex-direction: column;
  }
  
  /* Dashboard Responsive */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .user-info {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .form-container {
    padding: 20px;
    margin: 15px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn-primary,
  .form-actions .btn-secondary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }
  
  .video-actions {
    flex-direction: column;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
}

/* Support Button */
.support-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 1000;
}

.support-button:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.support-button i {
  font-size: 24px;
}

/* Support Chat Window */
.support-chat {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 400px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: none;
  flex-direction: column;
  max-height: 600px;
}

.support-chat.open {
  display: flex;
}

.support-header {
  padding: 20px;
  background: var(--primary);
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-header h3 {
  margin: 0;
  font-size: 18px;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.support-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  max-height: 400px;
}

.support-message {
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 8px;
}

.support-message.user {
  background: var(--primary);
  color: white;
  margin-left: 20%;
}

.support-message.admin {
  background: var(--bg);
  color: var(--text);
  margin-right: 20%;
}

.support-input {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.support-input textarea {
  flex: 1;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  resize: none;
  font-family: inherit;
}

.support-input button {
  padding: 10px 15px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.support-input button:hover {
  background: var(--primary-dark);
}

.support-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  border-radius: 12px;
}

.support-name-input {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 80%;
  max-width: 300px;
}

.support-name-input h3 {
  margin-top: 0;
  color: var(--text);
}

.support-name-input input {
  width: 100%;
  padding: 12px;
  margin: 15px 0;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
}

.support-name-input button {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.support-name-input button:hover {
  background: var(--primary-dark);
}
