@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");

html {
  overflow-x: auto;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 1s ease-out;
}

.animate-slide-in {
  animation: slide-in 0.8s ease-out;
}

/* Glassmorphism effect */
.glassmorphism {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Glowing button effect */
.glow-effect {
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.8);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(
    135deg,
    #f0f9ff 0%,
    #e0f2fe 25%,
    #e7f7ff 50%,
    #e8f5fb 75%,
    #e3f4fb 100%
  );
  color: #333333;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: auto;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle at 20% 80%,
      rgba(59, 130, 246, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(16, 185, 129, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(245, 158, 11, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: -1;
}

.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 40px;
  padding: 80px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  width: 32px;
  height: 32px;
  background: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
}

.header::after {
  content: "";
  position: absolute;
  bottom: 32px;
  right: 32px;
  width: 24px;
  height: 24px;
  background: rgba(16, 185, 129, 0.2);
  transform: rotate(45deg);
}

.logo-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.main-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 6rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.subtitle {
  font-size: 1.1rem;
  color: #6b7280;
  font-weight: 400;
  max-width: 800px;
  margin: 0 auto;
}

.info-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.info-icon {
  color: #2563eb;
  font-size: 1.2rem;
}

.info-text {
  font-size: 1rem;
  color: #374151;
  font-weight: 500;
}

#last-number {
  color: #000000;
  font-weight: 700;
}

/* Content */
.content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Dropdown Section */
.dropdown-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dropdown-card {
  background: #ffffff;
  border-radius: 5px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.3s ease;
}

.dropdown-card:hover {
  box-shadow:
    0 10px 15px rgba(0, 0, 0, 0.1),
    0 4px 6px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.dropdown-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-header:hover {
  background-color: #f9fafb;
}

.dropdown-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.dropdown-text p {
  font-size: 0.875rem;
  color: #6b7280;
}

.dropdown-icon {
  color: #6b7280;
  transition:
    transform 0.3s ease,
    color 0.2s ease;
}

.dropdown-card.active .dropdown-icon {
  transform: rotate(180deg);
  color: #2563eb;
}

.dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.dropdown-card.active .dropdown-content {
  max-height: 1500px;
  overflow-x: auto;
}

.code-list {
  padding: 0 24px 24px;
}

.code-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.code-item:last-child {
  border-bottom: none;
}

.code {
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 12px;
  min-width: 50px;
  text-align: center;
}

.description {
  color: #374151;
  font-weight: 500;
}

.code-table-container {
  padding: 0 24px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-columns {
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.code-column {
  flex: 1;
}

.code-column:nth-child(1) .code-table {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #0ea5e9;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.code-column:nth-child(1) .code-table th {
  background: #0284c7;
  color: #ffffff;
}

.code-column:nth-child(2) .code-table {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.code-column:nth-child(2) .code-table th {
  background: #d97706;
  color: #ffffff;
}

.code-column:nth-child(3) .code-table {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.code-column:nth-child(3) .code-table th {
  background: #059669;
  color: #ffffff;
}

.code-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.code-table th {
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.code-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #374151;
  font-size: 0.65rem;
}

.code-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

/* Stats Section */
.stats-section {
  padding: 20px 0 10px 0;
  background: #f9fafb;
}

.stats-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(20, 30, 40, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.6);
  padding: 20px;
  min-width: 200px;
  width: 100%;
  max-width: 300px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(20, 30, 40, 0.08);
}

.stat-header h3 {
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #20303b;
  letter-spacing: 0.2px;
  margin: 0;
  text-align: center;
}

.stat-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.stat-icon {
  min-width: 56px;
  min-height: 56px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(
    180deg,
    rgba(124, 92, 255, 0.12),
    rgba(124, 92, 255, 0.06)
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(124, 92, 255, 0.18);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.06) inset;
  padding: 8px;
}

.stat-icon i {
  width: 26px;
  height: 26px;
  display: block;
  color: #7c5cff;
  font-size: 1.5rem;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: #20303b;
  text-align: center;
}

.stat-number #last-number {
  color: #000000;
  font-weight: 800;
}

.stat-number #total-letters {
  color: #000000;
  font-weight: 800;
}

/* Action Section */
.action-section {
  display: flex;
  justify-content: flex-start;
  margin: 0;
  flex-wrap: wrap;
  gap: 20px;
}

.button-wrapper {
  display: flex;
  flex: 1;
}

.action-btn {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  border: none;
  padding: 16px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  margin: 0;
  width: 100%;
  justify-content: center;
}

.action-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.action-btn-secondary {
  background: linear-gradient(135deg, #10b981, #059669);
}

.action-btn-secondary:hover {
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.action-btn-tertiary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.action-btn-tertiary:hover {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.action-btn i {
  font-size: 1.1rem;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.875rem;
}

.form-group select,
.form-group input[type="text"],
.form-group input[type="file"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #374151;
  background: #ffffff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-group select:focus,
.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-btn {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.success-message {
  text-align: center;
  padding: 40px 20px;
  color: #059669;
}

.success-message i {
  font-size: 3rem;
  margin-bottom: 16px;
}

.success-message p {
  font-size: 1rem;
  margin: 0;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.close-modal {
  font-size: 2rem;
  font-weight: 300;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close-modal:hover {
  color: #111827;
  background: #f3f4f6;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.loading i {
  font-size: 3rem;
  margin-bottom: 16px;
  color: #2563eb;
}

.loading p {
  font-size: 1rem;
  margin: 0;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.file-item:hover {
  background: #f3f4f6;
  border-color: #2563eb;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.file-icon {
  margin-right: 16px;
  flex-shrink: 0;
}

.file-icon i {
  color: #2563eb;
  font-size: 1.2rem;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  font-size: 0.875rem;
  color: #6b7280;
}

.file-arrow {
  color: #9ca3af;
  font-size: 1.2rem;
  margin-left: 12px;
  transition: transform 0.2s ease;
}

.file-item:hover .file-arrow {
  transform: translateX(4px);
  color: #2563eb;
}

.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #dc2626;
}

.error-message i {
  font-size: 3rem;
  margin-bottom: 16px;
}

.error-message p {
  font-size: 1rem;
  margin-bottom: 20px;
  color: #6b7280;
}

.retry-btn {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.retry-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Table Section - Redesigned for better UX */
.table-section {
  margin-top: 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  text-align: left;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  text-align: left;
  margin-bottom: 24px;
}

.table-container {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.table-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.search-box-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #6b7280;
  font-size: 1rem;
  pointer-events: none;
}

.main-search-input {
  padding: 10px 12px 10px 40px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.875rem;
  color: #374151;
  background: #ffffff;
  width: 280px;
  transition: all 0.2s ease;
}

.main-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.main-search-input::placeholder {
  color: #9ca3af;
}

/* Modern Table Styling - Compact & Fit All Data */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 600px;
  overflow-y: auto;
  border-radius: 0 0 12px 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  table-layout: fixed;
}

thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  position: sticky;
  top: 0;
  z-index: 10;
}

th {
  padding: 10px 6px;
  text-align: center;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: none;
  white-space: normal;
  line-height: 1.2;
  vertical-align: middle;
}

td {
  padding: 8px 6px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-size: 0.75rem;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Column specific widths - Optimized to fit all data */
td:nth-child(1), th:nth-child(1) { width: 40px; text-align: center; }
td:nth-child(2), th:nth-child(2) { width: 14%; text-align: center; }
td:nth-child(3), th:nth-child(3) { width: 12%; text-align: center; }
td:nth-child(4), th:nth-child(4) { width: 10%; text-align: center; }
td:nth-child(5), th:nth-child(5) { width: 18%; text-align: center; }
td:nth-child(6), th:nth-child(6) { width: 14%; text-align: center; }
td:nth-child(7), th:nth-child(7) { width: 12%; text-align: center; }
td:nth-child(8), th:nth-child(8) { width: 10%; text-align: center; }
td:nth-child(9), th:nth-child(9) { width: 8%; text-align: center; }

/* Table header text wrapping - allow text to wrap when column is narrow */
th {
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

tbody tr {
  transition: all 0.15s ease;
}

tbody tr:hover {
  background-color: #dbeafe;
  box-shadow: inset 0 0 0 1px #3b82f6;
}

tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

tbody tr:nth-child(even):hover {
  background-color: #dbeafe;
}

/* Cell content styling - Allow text to wrap */
td {
  line-height: 1.4;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

/* Badge styling for jenis surat - Compact */
.jenis-badge-table {
  display: inline-block;
  padding: 3px 8px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

/* File icon in table */
td .file-icon {
  color: #2563eb;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

td .file-icon:hover {
  color: #1d4ed8;
  transform: scale(1.2);
}

/* No data styling */
.no-data {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 40px 20px;
  background: #f8fafc;
}

.no-data i {
  font-size: 2.5rem;
  color: #d1d5db;
  margin-bottom: 12px;
  display: block;
}

/* Table header improvements */
.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  text-align: left;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  text-align: left;
  margin-bottom: 0;
}

.main-search-input {
  padding: 8px 12px 8px 36px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #374151;
  background: #ffffff;
  width: 220px;
  transition: all 0.2s ease;
}

.main-search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Search Highlight Styles */
.search-highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(245, 158, 11, 0.3);
  animation: highlightPulse 0.3s ease;
}

@keyframes highlightPulse {
  0% {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    transform: scale(1);
  }
  50% {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    transform: scale(1.05);
  }
  100% {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    transform: scale(1);
  }
}

/* Row highlight for search matches */
tr.search-match {
  background-color: #eff6ff !important;
  box-shadow: inset 0 0 0 2px #3b82f6;
}

tr.search-match:hover {
  background-color: #dbeafe !important;
}

/* No results styling */
.no-search-results {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.no-search-results i {
  font-size: 3rem;
  color: #d1d5db;
  margin-bottom: 16px;
  display: block;
}

/* Pagination improvements */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 16px 20px;
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}


.pagination button {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 80px;
}

.pagination button:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #2563eb;
}

.pagination button:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  border-color: #cbd5e1;
}


/* Pagination redesign */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 20px 24px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.pagination button {
  background: #ffffff;
  color: #374151;
  border: 2px solid #e5e7eb;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 100px;
}

.pagination button:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #2563eb;
  transform: translateY(-1px);
}

.pagination button:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

.pagination .page-info {
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0 16px;
}

/* File Link */
.file-link {
  text-decoration: none;
  border: none !important;
  outline: none !important;
  background: none !important;
  box-shadow: none !important;
  display: inline;
}

/* File Icon */
.file-icon {
  color: #2563eb;
  font-size: 1.2rem;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  cursor: pointer;
}

.file-icon:hover {
  color: #1d4ed8;
  transform: scale(1.1);
}

/* Admin Top Bar */
.admin-top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.4);
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Profile Section */
.profile-section {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
}

.profile-container {
  position: relative;
  display: inline-block;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.profile-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.profile-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.9rem;
}

.profile-role {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: capitalize;
}

.profile-arrow {
  color: #9ca3af;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.profile-container.active .profile-arrow {
  transform: rotate(180deg);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 200px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

.profile-container.active .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-header {
  padding: 16px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-bottom: 1px solid #e5e7eb;
}

.profile-dropdown-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.profile-dropdown-email {
  font-size: 0.8rem;
  color: #6b7280;
}

.profile-dropdown-menu {
  padding: 8px;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #374151;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.profile-dropdown-item:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
}

.profile-dropdown-item i {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

.profile-dropdown-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 8px 0;
}

.profile-dropdown-item.logout {
  color: #dc2626;
}

.profile-dropdown-item.logout:hover {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
}

.admin-top-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.admin-top-link {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.admin-top-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.admin-top-link:hover::before {
  left: 100%;
}

.admin-top-link:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.admin-top-link:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.admin-top-link i {
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Admin Button in Header */
.admin-top-btn {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  margin-left: 15px;
}

.admin-top-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.admin-top-btn:hover::before {
  left: 100%;
}

.admin-top-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.2) 100%);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

.admin-top-btn:active {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.admin-top-btn i {
  font-size: 1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Adjust main container to account for fixed top bar */
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  padding-top: 80px;
}

/* Home Button */
.home-btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
  border: none;
  cursor: pointer;
  text-align: center;
}

.home-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
  color: #ffffff;
}

.home-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

.home-btn i {
  margin-right: 8px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 40px;
}

footer p {
  color: #6b7280;
  font-size: 0.875rem;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
  .main-container {
    padding: 20px;
  }

  .code-columns {
    gap: 15px;
  }

  .code-table th,
  .code-table td {
    font-size: 0.7rem;
    padding: 5px 6px;
  }
}

@media (max-width: 992px) {
  .main-container {
    padding: 18px;
  }

  .main-title {
    font-size: 5rem;
  }

  .code-columns {
    flex-direction: column;
    gap: 12px;
  }

  .code-table th,
  .code-table td {
    font-size: 0.65rem;
    padding: 4px 5px;
  }

  th,
  td {
    padding: 14px 18px;
    font-size: 0.825rem;
  }
}

@media (max-width: 768px) {
  .main-container {
    padding: 16px;
  }

  .main-title {
    font-size: 4rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .logo-container {
    gap: 10px;
  }

  .logo {
    width: 60px;
    height: 60px;
  }

  .dropdown-header {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .dropdown-text h3 {
    font-size: 1.1rem;
  }

  .code-list {
    padding: 0 20px 20px;
  }

  .code-table-container {
    padding: 0 20px 20px;
  }

  .code-columns {
    flex-direction: column;
    gap: 10px;
  }

  .code-table th,
  .code-table td {
    font-size: 0.6rem;
    padding: 3px 4px;
  }

  .action-btn {
    padding: 14px 24px;
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  th,
  td {
    padding: 12px 16px;
    font-size: 0.8rem;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 600px;
  }

  footer {
    padding: 16px;
  }

  footer p {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .main-container {
    padding: 12px;
  }

  .main-title {
    font-size: 3rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .logo {
    width: 50px;
    height: 50px;
  }

  .dropdown-header {
    padding: 16px;
  }

  .dropdown-text h3 {
    font-size: 1rem;
  }

  .code-table-container {
    padding: 0 16px 16px;
  }

  .code-table th,
  .code-table td {
    font-size: 0.55rem;
    padding: 2px 3px;
  }

  .action-btn {
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  th,
  td {
    padding: 10px 12px;
    font-size: 0.75rem;
  }

  table {
    min-width: 500px;
  }

  .pagination button {
    padding: 8px 12px;
    font-size: 0.8rem;
    width: 80px;
  }

  .pagination .page-info {
    font-size: 0.8rem;
  }

  footer p {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 10px;
  }

  .main-title {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 0.85rem;
  }

  .logo {
    width: 40px;
    height: 40px;
  }

  .dropdown-header {
    padding: 14px;
  }

  .dropdown-text h3 {
    font-size: 0.95rem;
  }

  .code-table-container {
    padding: 0 12px 12px;
  }

  .code-table th,
  .code-table td {
    font-size: 0.5rem;
    padding: 2px 3px;
  }

  .action-btn {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  th,
  td {
    padding: 8px 10px;
    font-size: 0.7rem;
  }

  table {
    min-width: 400px;
  }

  .pagination button {
    padding: 6px 10px;
    font-size: 0.75rem;
    width: 70px;
  }

  .pagination .page-info {
    font-size: 0.75rem;
  }

  footer {
    padding: 12px;
  }

  footer p {
    font-size: 0.7rem;
  }
}

/* Copyable cell styles */
.copyable-cell {
  cursor: pointer;
  position: relative;
  transition: background-color 0.2s ease;
  user-select: none;
}

.copyable-cell:hover {
  background-color: #e0f2fe !important;
}

/* Toast notification for copy */
.copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.3s ease;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.copy-toast i {
  font-size: 16px;
}

/* PDF Link styles */
.pdf-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.pdf-link:hover {
  transform: scale(1.1);
}

.pdf-link:hover .fa-file-pdf {
  color: #dc2626 !important;
}

/* Custom Dialog Modal */
.custom-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999999;
  animation: fadeIn 0.3s ease;
}

.custom-dialog.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-dialog-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 32px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.custom-dialog-icon {
  margin-bottom: 24px;
}

.custom-dialog-icon i {
  font-size: 4rem;
  color: #2563eb;
}

.custom-dialog-icon i.success {
  color: #10b981;
}

.custom-dialog-icon i.error {
  color: #ef4444;
}

.custom-dialog-icon i.warning {
  color: #f59e0b;
}

.custom-dialog-icon i.info {
  color: #3b82f6;
}

.custom-dialog-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
  font-family: "Inter", sans-serif;
}

.custom-dialog-message {
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 32px;
  line-height: 1.6;
  font-family: "Inter", sans-serif;
}

.custom-dialog-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.custom-dialog-btn {
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-size: 1rem;
  font-family: "Inter", sans-serif;
  min-width: 120px;
}

.custom-dialog-btn.primary {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.custom-dialog-btn.primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.custom-dialog-btn.secondary {
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  color: #374151;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-dialog-btn.secondary:hover {
  background: linear-gradient(135deg, #e5e7eb, #d1d5db);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZATIONS
   ============================================ */

/* Small Mobile: 360px and below */
@media (max-width: 360px) {
  html {
    font-size: 14px;
  }
  
  .main-container {
    padding: 10px;
  }
  
  .header {
    padding: 40px 0;
  }
  
  .logo {
    height: 30px;
  }
  
  .main-title {
    font-size: 1.4rem;
  }
  
  .subtitle {
    font-size: 0.75rem;
  }
  
  .custom-dialog-content {
    padding: 20px;
    max-width: 95%;
  }
  
  .custom-dialog-icon i {
    font-size: 2.5rem;
  }
  
  .custom-dialog-title {
    font-size: 1.25rem;
  }
  
  .custom-dialog-message {
    font-size: 0.9rem;
  }
  
  .custom-dialog-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
    min-width: 100px;
  }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
  html {
    font-size: 15px;
  }
  
  .main-container {
    padding: 15px;
  }
  
  .header {
    padding: 50px 0;
    margin-bottom: 20px;
  }
  
  .logo-container {
    gap: 10px;
  }
  
  .logo {
    height: 35px;
  }
  
  .main-title {
    font-size: 1.6rem;
    letter-spacing: 1px;
  }
  
  .subtitle {
    font-size: 0.8rem;
  }
  
  /* Table responsive */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .table-container table {
    min-width: 800px;
  }
  
  /* Modal responsive */
  .custom-dialog-content {
    max-width: 95%;
    width: 95%;
    padding: 24px;
    margin: 10px;
  }
  
  .custom-dialog-icon i {
    font-size: 3rem;
  }
  
  .custom-dialog-title {
    font-size: 1.4rem;
  }
  
  .custom-dialog-message {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }
  
  .custom-dialog-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .custom-dialog-btn {
    width: 100%;
    padding: 12px 20px;
  }
}

/* Tablet: 640px and below */
@media (max-width: 640px) {
  .main-container {
    padding: 20px;
  }
  
  .header {
    padding: 60px 0;
  }
  
  .logo {
    height: 40px;
  }
  
  .main-title {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 0.875rem;
  }
  
  /* Form elements */
  input,
  select,
  textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Table improvements */
  .table-container {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  /* Modal improvements */
  .custom-dialog-content {
    max-width: 90%;
    padding: 28px;
  }
}

/* Tablet: 768px and below */
@media (max-width: 768px) {
  .main-container {
    padding: 25px;
  }
  
  .header {
    padding: 70px 0;
    margin-bottom: 30px;
  }
  
  .logo {
    height: 45px;
  }
  
  .main-title {
    font-size: 2.2rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
  
  /* Glassmorphism adjustment */
  .glassmorphism {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  
  /* Scrollbar improvements for touch */
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  
  ::-webkit-scrollbar-thumb {
    border-radius: 3px;
  }
}

/* Large Tablet/Small Desktop: 1024px and below */
@media (max-width: 1024px) {
  .main-container {
    max-width: 100%;
    padding: 30px;
  }
  
  .header {
    padding: 80px 0;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .glow-effect:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
  }
  
  .custom-dialog-btn:hover {
    transform: none;
  }
  
  /* Larger touch targets */
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Prevent text selection on UI elements */
  .custom-dialog-btn,
  .custom-dialog-close {
    user-select: none;
    -webkit-user-select: none;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo,
  img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .header {
    padding: 30px 0;
  }
  
  .main-title {
    font-size: 1.8rem;
  }
  
  .custom-dialog-content {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Placeholder for dark mode styles */
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-fade-in-up,
  .animate-slide-in {
    animation: none;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  body::before {
    display: none;
  }
  
  .main-container {
    max-width: 100%;
    padding: 0;
  }
  
  .header {
    background: white;
    color: black;
    padding: 20px 0;
  }
  
  .glassmorphism,
  .glow-effect {
    background: white;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
