
/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* CSS Variables - CHESNEY Signage Theme */
:root {
  /* Colors - Modern Purple/Violet Palette */
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --primary-200: #ddd6fe;
  --primary-300: #c4b5fd;
  --primary-400: #a78bfa;
  --primary-500: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-700: #6d28d9;
  --primary-800: #5b21b6;
  --primary-900: #4c1d95;

  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Semantic Colors */
  --success: #10b981;
  --success-50: #ecfdf5;
  --success-100: #d1fae5;
  --warning: #f59e0b;
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --error: #ef4444;
  --error-50: #fef2f2;
  --error-100: #fee2e2;
  --info: #3b82f6;
  --info-50: #eff6ff;
  --info-100: #dbeafe;

  /* Typography Scale */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);

  /* Type Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Base Styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-900);
  background: var(--gray-50);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Focus Styles */
:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to Content */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--primary-600);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  text-decoration: none;
  z-index: var(--z-tooltip);
  font-weight: 600;
}

.skip-to-content:focus {
  top: var(--space-4);
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-4) 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  backdrop-filter: blur(8px);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: var(--text-lg);
}

.logo-icon img {
  height: 50px;
  width: 50px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gray-500);
  font-size: var(--text-sm);
}

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

.breadcrumb a:hover {
  color: var(--primary-700);
}

.close-btn {
  background: var(--gray-100);
  border: none;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--gray-600);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
}

.close-btn:hover {
  background: var(--gray-200);
  color: var(--gray-700);
}

/* Main Container */
.main-container {
  width: 100%;
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: 30% 70%;
  gap: 0;
  align-items: stretch;
}

/* Left Section - Hero */
.hero-section {
  height: 100%;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
}

.hero-content {
  text-align: center;
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-content::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

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

  to {
    transform: rotate(360deg);
  }
}

.hero-image {
  position: relative;
}

.connect-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  animation: float 6s ease-in-out infinite;
  position: relative;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Right Section - Form */
.form-section {
  background: white;
  height: 100%;
  min-height: calc(100vh - 80px);
  overflow-y: auto;
  border-left: 1px solid var(--gray-200);
}

.form-header {
  padding: var(--space-8);
  border-bottom: 1px solid var(--gray-200);
  background: linear-gradient(135deg, var(--gray-50), var(--primary-50));
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.form-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.form-subtitle {
  color: var(--gray-600);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.form-content {
  padding: var(--space-8);
}

/* Storage Info Widget - NEW ADDITION */
.storage-info {
  background: linear-gradient(135deg, var(--primary-50), var(--info-50));
  border: 2px solid var(--primary-200);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

.storage-info:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.storage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.storage-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.storage-header h3 i {
  color: var(--primary-600);
  font-size: var(--text-xl);
}

.storage-percentage {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--primary-700);
  background: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 2px solid var(--primary-200);
}

.storage-bar {
  width: 100%;
  height: 12px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-3);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.storage-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--success), var(--primary-500));
  border-radius: var(--radius-full);
  transition: all var(--transition-slow);
  width: 0%;
  position: relative;
}

.storage-progress::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.storage-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--gray-700);
}

.storage-used {
  font-weight: 600;
  color: var(--gray-900);
}

.storage-quota {
  font-weight: 500;
  color: var(--gray-600);
}

.storage-status {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.storage-status.low {
  color: var(--success);
}

.storage-status.medium {
  color: var(--warning);
}

.storage-status.high {
  color: var(--error);
}

/* Button Row */
.button-row {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  min-height: 48px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: white;
  box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(139, 92, 246, 0.4);
}

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

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

.btn-danger {
  background: linear-gradient(135deg, var(--error), #dc2626);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.4);
}

.filter-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  padding: 0 var(--space-4);
  min-height: 48px;
  cursor: pointer;
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
  width: auto;
}

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

.filter-select:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.filter-select i {
  position: absolute;
  left: var(--space-4);
  color: var(--gray-600);
  font-size: 1rem;
  pointer-events: none;
}

#filter-button {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: transparent;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--gray-700);
  padding: var(--space-3) var(--space-6) var(--space-3) 2rem; 
  min-height: 48px;
  cursor: pointer;
  line-height: 1.2;
  width: 100%;
  outline: none;
  margin-left: 5px;
}

#filter-button::-ms-expand {
  display: none;
}
#filter-button::-webkit-inner-spin-button,
#filter-button::-webkit-calendar-picker-indicator {
  display: none !important;
  -webkit-appearance: none;
}

/* Media Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.media-item {
  background: white;
  border-radius: var(--radius-xl);
  border: 2px solid var(--gray-200);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.media-item:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.media-placeholder {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
}

.media-placeholder:hover {
  background: var(--primary-50);
}

.media-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition-base);
}

.media-thumbnail.loaded-media {
  filter: none;
}

.placeholder-icon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--gray-400);
}

.placeholder-text {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.file-item {
  padding: var(--space-4);
  background: white;
}

.media-actions {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 10;
}

.select-media-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.select-media-checkbox:checked {
  background: var(--primary-600);
  border-color: var(--primary-600);
}

.select-media-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
}

.file-name {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
  word-break: break-word;
}

.file-size {
  font-size: var(--text-xs);
  color: var(--gray-500);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: var(--space-4);
  background: var(--gray-50);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
}

.page-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: var(--gray-300);
}

#page-info {
  font-weight: 600;
  color: var(--gray-700);
  font-size: var(--text-sm);
  padding: 0 var(--space-4);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  animation: fadeIn 0.3s ease-out;
  padding: var(--space-4);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  max-width: 500px;
  width: 100%;
  animation: scaleIn 0.3s ease-out;
  overflow: hidden;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--gray-200);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.modal-description {
  color: var(--gray-600);
  line-height: 1.5;
}

.modal-body {
  padding: var(--space-6);
}

.modal-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  padding: var(--space-4) var(--space-6) var(--space-6);
  background: var(--gray-50);
}

.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 2px solid var(--gray-200);
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
}

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

.playlist-option {
  padding: var(--space-3);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  transition: all var(--transition-fast);
}

.playlist-option:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
}

.playlist-option label {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  font-weight: 500;
}

.new-playlist-section {
  border-top: 1px solid var(--gray-200);
  padding-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.new-playlist-section h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

#new-playlist-name {
  width: 100%;
  padding: var(--space-4) var(--space-4);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: all var(--transition-base);
  background: var(--gray-50);
  margin-bottom: var(--space-4);
}

#new-playlist-name:focus {
  border-color: var(--primary-500);
  background: white;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Upload Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  animation: fadeIn 0.3s ease-out;
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-2xl);
  text-align: center;
  box-shadow: var(--shadow-2xl);
  animation: scaleIn 0.3s ease-out;
  max-width: 400px;
  width: 90%;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--primary-100);
  border-left-color: var(--primary-600);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-4);
}

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

.loading-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.loading-description {
  color: var(--gray-600);
  font-size: var(--text-sm);
}

#upload-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

#upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-600), var(--primary-500));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  width: 0%;
}

#upload-percentage {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-600);
}

/* Notifications */
.notification {
  position: fixed;
  top: var(--space-8);
  right: var(--space-8);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-tooltip);
  max-width: 400px;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--primary-500);
  overflow: hidden;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification.hidden {
  display: none;
}

.notification-content {
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: start;
  gap: var(--space-3);
}

.notification-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.notification-icon.success {
  color: var(--success);
}

.notification-icon.error {
  color: var(--error);
}

.notification-icon.warning {
  color: var(--warning);
}

.notification-icon.info {
  color: var(--info);
}

.notification-text {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: var(--space-1);
}

.notification-message {
  color: var(--gray-600);
  font-size: var(--text-sm);
  line-height: 1.5;
}

.notification-close {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.notification-close:hover {
  color: var(--gray-600);
}

/* Confirmation Modal */
.modal-overlay.confirm {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content.confirm {
  max-width: 350px;
  padding: var(--space-6);
}

.confirm-message {
  font-weight: 500;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: var(--space-4);
}

.confirm-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

#confirm-yes,
#confirm-no {
  padding: var(--space-4) var(--space-6);
  border: none;
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  min-height: 48px;
}

#confirm-yes {
  background: var(--primary-600);
  color: white;
}

#confirm-yes:hover {
  background: var(--primary-700);
}

#confirm-no {
  background: var(--gray-200);
  color: var(--gray-700);
}

#confirm-no:hover {
  background: var(--gray-300);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 35% 65%;
  }

  .hero-section {
    padding: var(--space-4);
  }

  .hero-content {
    padding: var(--space-6);
  }

  .connect-image {
    max-width: 300px;
  }

  .form-title {
    font-size: var(--text-2xl);
  }

  .form-subtitle {
    font-size: var(--text-base);
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-3);
  }

  .button-row {
    gap: var(--space-2);
  }

  .btn-primary,
  #filter-button {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }

  .storage-info {
    padding: var(--space-4);
  }
}

@media (max-width: 768px) {
  .main-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .hero-section {
    position: static;
    min-height: auto;
    padding: var(--space-6);
  }

  .form-section {
    min-height: auto;
    border-left: none;
    border-top: 1px solid var(--gray-200);
  }

  .form-header {
    position: static;
  }

  .header-content {
    padding: 0 var(--space-4);
  }

  .form-content {
    padding: var(--space-6) var(--space-4);
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-2);
  }

  .media-placeholder {
    height: 120px;
  }

  .pagination {
    flex-direction: column;
    gap: var(--space-2);
  }

  .breadcrumb {
    display: none;
  }

  .notification {
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }

  .modal-actions {
    flex-direction: column;
  }

  .storage-details {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: var(--space-6);
  }

  .form-title {
    font-size: var(--text-2xl);
  }

  .btn {
    padding: var(--space-3) var(--space-4);
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .media-placeholder {
    height: 100px;
  }

  .modal-content {
    margin: var(--space-4);
  }

  .storage-info {
    padding: var(--space-3);
  }

  .storage-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* Scrollbar Styling */
.form-section::-webkit-scrollbar {
  width: 6px;
}

.form-section::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.form-section::-webkit-scrollbar-thumb {
  background: var(--primary-300);
  border-radius: var(--radius-full);
}

.form-section::-webkit-scrollbar-thumb:hover {
  background: var(--primary-500);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .media-item {
    border-width: 3px;
  }

  .select-media-checkbox {
    border-width: 3px;
  }
}

@media screen and (max-width: 1380px) and (max-height: 800px) {
  html {
    font-size: 85%;
  }

  * {
    box-sizing: border-box;
  }

  body {
    padding: 0;
    margin: 0;
  }

  .main-container {
    gap: 0.8rem;
  }

  .hero-section,
  .form-section {
    padding: 0.8em;
  }

  .media-grid {
    gap: var(--space-3);
  }

  img,
  video {
    max-width: 100%;
    height: auto;
  }
}

/* Additional Media Item States */
.file-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 100%;
  background: var(--gray-50);
  color: var(--gray-600);
}

.file-preview-icon {
  font-size: var(--text-3xl);
}

.file-preview-text {
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Animation for media loading */
.media-item[data-loading="true"] .media-placeholder {
  background: linear-gradient(90deg,
      var(--gray-100) 25%,
      var(--gray-200) 50%,
      var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.click-to-load-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.click-to-load-overlay:hover {
  background: rgba(0, 0, 0, 0.8);
}

.playlist-options {
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}