/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  width: 100%;
}

:root {
  /* Professional Color Palette */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #7c3aed;
  --secondary-hover: #6d28d9;
  --success-color: #059669;
  --success-hover: #047857;
  --danger-color: #dc2626;
  --danger-hover: #b91c1c;
  --warning-color: #d97706;
  --warning-hover: #b45309;
  --info-color: #0891b2;
  --info-hover: #0e7490;
  
  /* 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;
  
  /* Theme Colors */
  --bg-primary: #ffffff;
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--gray-100);
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-500);
  --border-color: var(--gray-200);
  --border-hover: var(--gray-300);
  
  /* 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);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: var(--gray-900);
    --bg-secondary: var(--gray-800);
    --bg-tertiary: var(--gray-700);
    --text-primary: var(--gray-100);
    --text-secondary: var(--gray-300);
    --text-tertiary: var(--gray-400);
    --border-color: var(--gray-700);
    --border-hover: var(--gray-600);
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  background: var(--bg-secondary);
  min-height: 100vh;
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1.6;
  font-size: 16px;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* Header Styles */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-symbol {
  font-size: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-lg);
  padding: 10px;
  color: white;
  box-shadow: var(--shadow-md);
}

.logo-text h1 {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
}

.logo-text p {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
}

.login-btn-header {
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.login-btn-header:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Enhanced Button Styles */
.logout-btn {
  padding: 8px 16px;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: var(--transition);
}

.logout-btn:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
}

.login-btn {
  padding: 16px 32px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.login-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 30px;
  background: var(--bg-tertiary);
  padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 15px 20px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  font-size: 14px;
  position: relative;
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow);
}

.tab-btn:hover:not(.active) {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeInUp 0.3s ease-out;
}

/* Enhanced Form Elements */
.search-container {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  align-items: center;
}

.search-container input, .search-container select {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}

.search-container input:focus, .search-container select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Upload Section */
.upload-section {
  background: var(--bg-primary);
  padding: 25px;
  border-radius: var(--radius-xl);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.upload-section h2 {
  margin-bottom: 20px;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
}

.upload-form {
  display: flex;
  gap: 15px;
  align-items: end;
}

.file-input-container {
  display: flex;
  gap: 15px;
  flex: 1;
  align-items: end;
}

.file-input-container input, .file-input-container select {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}

.file-input-container input:focus, .file-input-container select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.file-input-container input[type="file"] {
  flex: 2;
}

.file-input-container select {
  flex: 1;
}

.upload-btn {
  padding: 12px 24px;
  background: var(--success-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.upload-btn:hover {
  background: var(--success-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.upload-status {
  margin-top: 15px;
  padding: 10px;
  border-radius: var(--radius);
}

/* Admin Controls */
.admin-controls {
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.admin-controls h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.admin-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.clear-all-btn {
  padding: 12px 24px;
  background: var(--danger-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.clear-all-btn:hover {
  background: var(--danger-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.export-btn {
  padding: 12px 24px;
  background: var(--info-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.export-btn:hover {
  background: var(--info-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Files Section */
.files-section {
  margin-top: 30px;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.files-header h2 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
}

.clear-storage-btn {
  padding: 10px 16px;
  background: var(--warning-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.clear-storage-btn:hover {
  background: var(--warning-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Storage Information Styles */
.storage-info {
  background: var(--bg-primary);
  padding: 20px;
  border-radius: var(--radius-lg);
  margin-bottom: 25px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.storage-header h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 700;
}

.storage-bar-container {
  margin-bottom: 15px;
}

.storage-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}

.storage-progress {
  height: 100%;
  background: var(--success-color);
  border-radius: var(--radius-sm);
  transition: var(--transition-slow);
  width: 0%;
}

.storage-progress.warning {
  background: var(--warning-color);
}

.storage-progress.critical {
  background: var(--danger-color);
}

.storage-text {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.storage-limits {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
}

.limit-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  flex: 1;
}

.limit-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.limit-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Enhanced PDF Items */
.pdf-list {
  display: grid;
  gap: 20px;
}

.pdf-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.pdf-info {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
}

.pdf-icon {
  font-size: 28px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius);
  padding: 8px;
  color: white;
  box-shadow: var(--shadow);
}

.pdf-details {
  flex: 1;
}

.pdf-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.pdf-meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 12px;
}

.pdf-meta span {
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
}

.pdf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.preview-btn {
  background: var(--info-color);
  color: white;
}

.download-btn {
  background: var(--success-color);
  color: white;
}

.delete-btn {
  background: var(--danger-color);
  color: white;
}

.action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.preview-btn:hover {
  background: var(--info-hover);
}

.download-btn:hover {
  background: var(--success-hover);
}

.delete-btn:hover {
  background: var(--danger-hover);
}

/* Login Section */
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: var(--bg-secondary);
}

.login-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  max-width: 450px;
  width: 100%;
  position: relative;
}

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

.login-form {
  /* No additional styles needed */
}

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

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

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.password-input-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  z-index: 2;
  color: var(--text-secondary);
}

.login-footer {
  text-align: center;
  margin-top: 20px;
}

.login-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.login-footer a:hover {
  color: var(--primary-hover);
}

.demo-info {
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
}

.demo-info h4 {
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 600;
}

.demo-info p {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.demo-hint {
  color: var(--primary-color);
  font-weight: 600;
}

/* Downloads Section */
.downloads-section {
  padding: 20px 0;
}

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

.downloads-header h2 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
}

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

.downloads-filter select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}

.downloads-filter select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.clear-btn {
  padding: 8px 12px;
  background: var(--warning-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.clear-btn:hover {
  background: var(--warning-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.downloads-list {
  display: grid;
  gap: 15px;
}

.download-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 15px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.download-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.download-info {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.download-icon {
  font-size: 24px;
  background: var(--info-color);
  border-radius: var(--radius);
  padding: 6px;
  color: white;
  box-shadow: var(--shadow-sm);
}

.download-details {
  flex: 1;
}

.download-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.download-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}

.download-meta span {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
}

.download-actions {
  display: flex;
  gap: 10px;
}

.download-again-btn {
  background: var(--success-color);
  color: white;
}

.download-again-btn:hover {
  background: var(--success-hover);
}

/* Comments Section */
.comments-section {
  padding: 20px 0;
}

.comments-section h2 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 25px;
}

.comment-form {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.submit-btn {
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.submit-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.comments-list {
  display: grid;
  gap: 20px;
}

.comment-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.comment-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-icon {
  font-size: 20px;
}

.comment-category {
  font-weight: 600;
  color: var(--primary-color);
  text-transform: capitalize;
}

.comment-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-badge {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-pending {
  background: var(--warning-color);
  color: white;
}

.status-reviewed {
  background: var(--info-color);
  color: white;
}

.status-resolved {
  background: var(--success-color);
  color: white;
}

.comment-text {
  background: var(--bg-tertiary);
  padding: 15px;
  border-radius: var(--radius);
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  line-height: 1.6;
  color: var(--text-primary);
}

.comment-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-btn {
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.reviewed-btn {
  background: var(--info-color);
  color: white;
}

.resolved-btn {
  background: var(--success-color);
  color: white;
}

.status-btn.delete-btn {
  background: var(--danger-color);
  color: white;
}

.status-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.reviewed-btn:hover {
  background: var(--info-hover);
}

.resolved-btn:hover {
  background: var(--success-hover);
}

.status-btn.delete-btn:hover {
  background: var(--danger-hover);
}

/* About Section */
.about-section {
  padding: 20px 0;
}

.about-section h2 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 25px;
  text-align: center;
}

.about-content {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.about-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 25px;
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
}

.about-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.about-card h3 {
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: 700;
}

.about-card p, .about-card ul {
  line-height: 1.6;
  color: var(--text-secondary);
}

.about-card ul {
  padding-left: 20px;
}

.about-card li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 30px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  color: var(--text-primary);
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: var(--transition);
}

.close-btn:hover {
  background: var(--bg-tertiary);
  color: var(--danger-color);
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--gray-300);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-overlay p {
  color: white;
  font-size: 16px;
  font-weight: 500;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  z-index: 3000;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
}

.error-toast {
  background: var(--danger-color);
  color: white;
}

.success-toast {
  background: var(--success-color);
  color: white;
}

.toast-icon {
  font-size: 20px;
}

.toast-message {
  flex: 1;
  font-weight: 600;
}

.toast-close {
  background: none;
  border: none;
  color: currentColor;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: var(--transition);
  opacity: 0.8;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

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

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

.login-required {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin: 20px 0;
}

.login-required p {
  color: var(--text-primary);
  font-weight: 600;
}

/* Animation Effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    margin: 10px;
    padding: 15px;
  }
  
  .app-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .nav-tabs {
    flex-direction: column;
  }
  
  .tab-btn {
    padding: 12px 15px;
    font-size: 12px;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .upload-form {
    flex-direction: column;
  }
  
  .file-input-container {
    flex-direction: column;
  }
  
  .pdf-info {
    flex-direction: column;
    text-align: center;
  }
  
  .pdf-actions {
    justify-content: center;
  }
  
  .downloads-header {
    flex-direction: column;
    text-align: center;
  }
  
  .admin-actions {
    justify-content: center;
  }
  
  .about-content {
    grid-template-columns: 1fr;
  }
  
  .comment-header {
    flex-direction: column;
    text-align: center;
  }
  
  .comment-actions {
    justify-content: center;
  }
  
  .toast {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 20px;
    margin: 10px;
  }
  
  .logo-text h1 {
    font-size: 24px;
  }
  
  .logo-symbol {
    font-size: 32px;
  }
  
  .pdf-meta {
    flex-direction: column;
    gap: 5px;
  }
  
  .download-meta {
    flex-direction: column;
    gap: 5px;
  }
  
  .comment-meta {
    flex-direction: column;
    gap: 5px;
  }
}

/* Additional Animation Effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content.active {
  animation: fadeInUp 0.3s ease-out;
}

.pdf-item {
  animation: fadeInUp 0.3s ease-out;
}

.download-item {
  animation: fadeInUp 0.3s ease-out;
}

.comment-item {
  animation: fadeInUp 0.3s ease-out;
}

.about-card {
  animation: fadeInUp 0.3s ease-out;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Selection Styling */
::selection {
  background: rgba(37, 99, 235, 0.2);
  color: var(--text-primary);
}

::-moz-selection {
  background: rgba(37, 99, 235, 0.2);
  color: var(--text-primary);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --border-color: var(--gray-900);
    --text-secondary: var(--gray-800);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .nav-tabs,
  .upload-section,
  .admin-controls,
  .toast,
  .loading-overlay {
    display: none !important;
  }
  
  .pdf-item,
  .download-item,
  .comment-item {
    border: 1px solid black;
    break-inside: avoid;
  }
}
