/* Complete CSS - Desktop unchanged, Mobile like Desktop but optimized */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  transition: background 0.3s ease;
}

/* Main app background with Library_Home.png */
body.app-active {
  background-image: url('./Library_Home.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
}

/* Add overlay for better readability when app is active */
body.app-active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: -1;
  pointer-events: none;
}

/* Make sections semi-transparent when app is active */
body.app-active section {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
}

body.app-active .inventory-table-container {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(3px);
}

body.app-active .pagination-controls {
  background-color: rgba(248, 249, 250, 0.95);
  backdrop-filter: blur(2px);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

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

h1 {
  color: #2c3e50;
  margin-bottom: 10px;
}

h2 {
  color: #3498db;
  margin-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 10px;
}

/* Authentication Styles */
.auth-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image: url('./library-background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  position: relative;
  color: white;
}

.auth-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.auth-section > * {
  position: relative;
  z-index: 2;
}

.auth-section header {
  margin-bottom: 40px;
}

.auth-section h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.auth-section p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.auth-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Marketing Panel Styles */
.marketing-panel {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 900px;
  margin: 0 auto 30px auto;
  padding: 40px 30px;
  backdrop-filter: blur(5px);
}

.marketing-content h2 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 10px;
  font-size: 2rem;
  border: none;
  padding: 0;
}

.marketing-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 25px;
  margin-bottom: 35px;
}

.feature-item {
  text-align: center;
  padding: 20px;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}

.feature-item h3 {
  color: #2c3e50;
  font-size: 1rem;
  margin-bottom: 8px;
  border: none;
  padding: 0;
}

.feature-item p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.pricing-info {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 2px solid #ecf0f1;
}

.pricing-badge {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.pricing-badge.free {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.pricing-badge.premium {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.pricing-badge h3 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  border: none;
  padding: 0;
  color: white;
}

.pricing-badge .price {
  font-size: 2.5rem;
  font-weight: bold;
  margin: 10px 0;
  color: white;
}

.pricing-badge .price span {
  font-size: 1rem;
  font-weight: normal;
  opacity: 0.9;
}

.pricing-badge .price-detail {
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.95;
  color: white;
}

/* Signup benefit text */
.signup-benefit {
  text-align: center;
  color: #27ae60;
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 20px;
  padding: 8px 12px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(39, 174, 96, 0.2);
}

/* Mobile responsive for marketing panel */
@media (max-width: 768px) {
  .marketing-panel {
    padding: 30px 20px;
    margin-bottom: 20px;
  }

  .marketing-content h2 {
    font-size: 1.5rem;
  }

  .marketing-subtitle {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .pricing-info {
    flex-direction: column;
  }

  .pricing-badge {
    max-width: 100%;
  }
}
.auth-tabs {
  display: flex;
  background-color: #f8f9fa;
}

.auth-tab {
  flex: 1;
  padding: 15px 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  transition: all 0.3s ease;
}

.auth-tab.active {
  background-color: white;
  color: #3498db;
  border-bottom: 3px solid #3498db;
}

.auth-form {
  padding: 30px;
  color: #333;
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #2c3e50;
  border: none;
  padding: 0;
}

/* Password Input with Toggle */
.password-input-container {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
  color: #666;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: #3498db;
}

/* Auth Links */
.auth-links {
  text-align: center;
  margin-top: 15px;
}

.link-button {
  background: none;
  border: none;
  color: #3498db;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
  padding: 5px;
}

.link-button:hover {
  color: #2980b9;
  background: none;
}

/* Reset Password Instructions */
.reset-instructions {
  color: #666;
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}

/* App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Navigation Tabs */
.main-nav {
  display: flex;
  gap: 10px;
}

.nav-tab {
  background: none;
  border: 2px solid #3498db;
  color: #3498db;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-tab:hover {
  background-color: #3498db;
  color: white;
}

.nav-tab.active {
  background-color: #3498db;
  color: white;
}

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

.user-menu span {
  font-weight: 500;
  color: #2c3e50;
}

.logout-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.logout-btn:hover {
  background-color: #c0392b;
}

/* Page Content */
.page-content {
  width: 100%;
}

/* Form Styles */
section {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 30px;
  backdrop-filter: blur(2px);
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

input, textarea, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background-color: rgba(255, 255, 255, 0.9);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
  background-color: white;
}

button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #2980b9;
}

button:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

#clearButton {
  background-color: #95a5a6;
  margin-left: 10px;
}

#clearButton:hover {
  background-color: #7f8c8d;
}

/* Add Book Options */
.add-book-options {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.isbn-lookup,
.manual-entry {
  flex: 1;
  min-width: 250px;
}

.isbn-lookup h3,
.manual-entry h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.1rem;
  border: none;
  padding: 0;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  color: #7f8c8d;
  font-weight: 500;
  min-width: 40px;
}

.manual-btn {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  transition: background-color 0.2s;
}

.manual-btn:hover {
  background-color: #219a52;
}

.manual-help {
  font-size: 14px;
  color: #666;
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}

.export-csv-btn {
  background-color: #16a085;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.export-csv-btn:hover {
  background-color: #138871;
}

/* Enhanced Book Form */
.book-info {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.book-cover {
  flex: 0 0 250px;
  text-align: center;
}

.book-cover img {
  max-width: 100%;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.book-cover img:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.cover-help {
  font-size: 12px;
  color: #666;
  margin-top: 8px;
  font-style: italic;
}

.book-form {
  flex: 1;
  min-width: 300px;
}

/* Group Sharing Options */
.group-sharing-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.sharing-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sharing-option input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.sharing-option label {
  margin: 0;
  cursor: pointer;
  font-weight: normal;
}

.sharing-option.private {
  color: #7f8c8d;
  font-style: italic;
}

.sharing-option.group {
  padding-left: 20px;
}

/* Small text helper */
small {
  display: block;
  color: #666;
  font-size: 12px;
  margin-top: 4px;
}

.form-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.delete-book-btn {
  background-color: #e74c3c;
  color: white;
}

.delete-book-btn:hover {
  background-color: #c0392b;
}

#clearButton {
  background-color: #95a5a6;
  margin-left: 0;
}

#clearButton:hover {
  background-color: #7f8c8d;
}

/* Enhanced Inventory Section with Multi-Column Filtering and Pagination */
.inventory-header {
  margin-bottom: 20px;
}

.search-and-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}

.search-and-filters input[type="text"] {
  flex: 1;
  min-width: 300px;
  padding: 12px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  transition: border-color 0.3s ease;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z'/%3e%3c/svg%3e");
  background-position: left 12px center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
  padding-left: 40px;
  background-color: rgba(255, 255, 255, 0.9);
}

.search-and-filters input[type="text"]:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  background-color: white;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-count {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.clear-filters-btn {
  background-color: #95a5a6;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.clear-filters-btn:hover {
  background-color: #7f8c8d;
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(248, 249, 250, 0.95);
  border-radius: 6px;
  backdrop-filter: blur(2px);
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.page-size-selector {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  min-width: 80px;
}

.page-size-selector:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.pagination-buttons {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  min-width: 40px;
  text-align: center;
  backdrop-filter: blur(2px);
  color: #333;
}

.pagination-btn:hover:not(:disabled) {
  background-color: rgba(248, 249, 250, 0.95);
  border-color: #3498db;
  transform: translateY(-1px);
}

.pagination-btn.active {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.page-jump input {
  width: 70px;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.9);
}

.page-jump input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Collection Info and Legend */
.collection-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.legend {
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid #ddd;
}

.legend-color.own-books {
  background-color: #fff;
}

.legend-color.shared-books {
  background-color: #e8f4fd;
}

/* Enhanced Table Styles with Sticky Headers and Fixed Columns */
.inventory-table-container {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  max-height: 700px;
  overflow-y: auto;
  overflow-x: auto;
  backdrop-filter: blur(3px);
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.95);
  min-width: 1000px;
  table-layout: fixed; /* This prevents resizing */
}

/* STICKY HEADER IMPLEMENTATION */
.inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(3px);
}

.inventory-table th,
.inventory-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
  vertical-align: middle;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 4em; /* Limit height to about 3 lines */
  line-height: 1.3;
}

.inventory-table th {
  background-color: rgba(248, 249, 250, 0.95);
  font-weight: 600;
  color: #2c3e50;
}

/* FIXED COLUMN WIDTHS - NO RESIZING */
.col-cover { width: 70px; min-width: 70px; max-width: 70px; }
.col-title { width: 140px; min-width: 140px; max-width: 140px; }
.col-author { width: 120px; min-width: 120px; max-width: 120px; }
.col-series { width: 120px; min-width: 120px; max-width: 120px; }
.col-categories { width: 110px; min-width: 110px; max-width: 110px; }
.col-owner { width: 100px; min-width: 100px; max-width: 100px; }
.col-location { width: 110px; min-width: 110px; max-width: 110px; }
.col-status { width: 120px; min-width: 120px; max-width: 120px; }
.col-group { width: 130px; min-width: 130px; max-width: 130px; }

/* Keep cover column and status single line */
.inventory-table .col-cover td,
.inventory-table .col-status td {
  white-space: nowrap;
  max-height: 1.5em;
}

/* Filterable Header Styling */
.filterable-header {
  padding: 8px !important;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.header-content span {
  font-weight: 600;
  color: #2c3e50;
  white-space: nowrap;
  font-size: 13px;
}

.column-filter {
  width: 100%;
  min-width: 80px;
  max-width: 130px;
  padding: 4px 6px;
  font-size: 11px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: normal;
}

.column-filter:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
  background-color: white;
}

.column-filter:hover {
  border-color: #bbb;
  background-color: white;
}

/* Row Styling - Enhanced for Click-to-Edit */
.inventory-table tbody tr {
  transition: all 0.2s ease;
}

.inventory-table tbody tr:hover {
  background-color: rgba(248, 249, 250, 0.8);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Make editable rows clearly clickable */
.inventory-table tbody tr[style*="cursor: pointer"] {
  cursor: pointer !important;
}

.inventory-table tbody tr[style*="cursor: pointer"]:hover {
  background-color: rgba(227, 242, 253, 0.8) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Shared book styling */
.inventory-table tbody tr.shared-book {
  background-color: rgba(232, 244, 253, 0.8);
}

.inventory-table tbody tr.shared-book:hover {
  background-color: rgba(212, 233, 247, 0.8);
}

/* Cover Image Styling */
.cover-thumbnail {
  width: 50px;
  height: 70px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  display: block;
  margin: 0 auto;
}

.cover-thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Status Column Styling */
.status-column {
  font-weight: 500;
}

.status-column.available {
  color: #27ae60;
}

.status-column.checked-out {
  color: #e74c3c;
  font-style: italic;
}

/* Group Column Styling */
.group-column {
  font-weight: 500;
  color: #3498db;
}

.inventory-table tbody tr.shared-book .group-column {
  color: #2980b9;
  font-style: italic;
}

/* Series Column Styling */
.series-column {
  font-style: italic;
  color: #666;
  font-size: 14px;
}

/* Groups Page Styles */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
  color: #2c3e50;
  margin: 0;
  border: none;
  padding: 0;
}

.create-group-btn {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.create-group-btn:hover {
  background-color: #219a52;
}

/* Groups Grid */
.groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.group-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(2px);
}

.group-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.98);
}

.group-card.owner {
  border-left: 4px solid #f39c12;
}

.group-card.member {
  border-left: 4px solid #3498db;
}

.group-info h3 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  border: none;
  padding: 0;
}

.group-description {
  color: #666;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.4;
}

.group-stats {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: #7f8c8d;
  margin-bottom: 15px;
}

.group-role {
  margin-bottom: 15px;
}

.role-badge {
  background-color: #ecf0f1;
  color: #2c3e50;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.role-badge.owner {
  background-color: #f39c12;
  color: white;
}

.role-badge.admin {
  background-color: #e74c3c;
  color: white;
}

.role-badge.member {
  background-color: #3498db;
  color: white;
}

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

.btn-primary, .btn-secondary, .btn-success, .btn-danger {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-secondary {
  background-color: #95a5a6;
  color: white;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-success {
  background-color: #27ae60;
  color: white;
}

.btn-success:hover {
  background-color: #219a52;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

.btn-small {
  padding: 4px 8px;
  font-size: 12px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #7f8c8d;
}

.empty-state h3 {
  color: #2c3e50;
  margin-bottom: 10px;
  border: none;
  padding: 0;
}

.loading-message, .error-message {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
}

.error-message {
  color: #e74c3c;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
}

.large-modal {
  max-width: 800px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #ecf0f1;
}

.modal-header h2 {
  margin: 0;
  color: #2c3e50;
  border: none;
  padding: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #7f8c8d;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #2c3e50;
  background: none;
}

.modal form {
  padding: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal-body {
  padding: 20px;
}

/* Group Books Modal */
.group-books-list {
  max-height: 500px;
  overflow-y: auto;
}

.group-book-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  border-bottom: 1px solid #ecf0f1;
  background: rgba(249, 249, 249, 0.8);
  margin-bottom: 10px;
  border-radius: 6px;
  backdrop-filter: blur(2px);
}

.group-book-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.book-cover-small {
  flex-shrink: 0;
}

.book-cover-small img {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.book-details {
  flex: 1;
}

.book-details h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.book-author {
  color: #7f8c8d;
  margin: 0 0 8px 0;
  font-weight: 500;
}

.book-meta {
  color: #95a5a6;
  font-size: 14px;
  margin: 0 0 8px 0;
}

.book-owner, .book-location {
  color: #7f8c8d;
  font-size: 14px;
  margin: 0 0 4px 0;
}

.book-categories {
  color: #3498db;
  font-size: 14px;
  margin: 0 0 8px 0;
}

.book-notes {
  color: #666;
  font-size: 14px;
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}

.book-series {
  color: #666;
  font-size: 14px;
  font-style: italic;
  margin: 0 0 4px 0;
}

/* Edit Group Form */
#deleteGroupBtn {
  margin-right: auto;
}

/* Invite Members Modal */
.invite-section {
  padding: 20px;
  border-bottom: 1px solid #ecf0f1;
}

.invite-section h3 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  border: none;
  padding: 0;
}

.members-section {
  padding: 20px;
}

.members-section h3 {
  margin: 0 0 15px 0;
  color: #2c3e50;
  border: none;
  padding: 0;
}

.members-list {
  max-height: 300px;
  overflow-y: auto;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ecf0f1;
}

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

.member-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.member-name {
  font-weight: 500;
  color: #2c3e50;
}

.member-role {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: capitalize;
}

.member-actions {
  display: flex;
  gap: 5px;
}

.empty-message {
  text-align: center;
  color: #7f8c8d;
  padding: 20px;
  font-style: italic;
}

/* Invitations */
.pending-invitations {
  margin-top: 40px;
}

.pending-invitations h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 10px;
}

.invitation-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.invitation-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  backdrop-filter: blur(2px);
}

.invitation-info h4 {
  margin: 0 0 5px 0;
  color: #2c3e50;
}

.invitation-info p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
}

.invitation-date {
  font-size: 12px;
  color: #95a5a6;
}

.invitation-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

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

/* Account Page Styles */
.account-section {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 25px;
  margin-bottom: 25px;
  backdrop-filter: blur(2px);
}

.account-section h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 10px;
}

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

.account-section .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #2c3e50;
}

.account-section input[type="email"],
.account-section input[type="text"],
.account-section input[type="password"] {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
  background-color: rgba(255, 255, 255, 0.9);
}

.account-section input[type="email"]:disabled {
  background-color: #f8f9fa;
  color: #666;
  cursor: not-allowed;
}

.account-section input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  background-color: white;
}

.account-section small {
  display: block;
  color: #666;
  font-size: 13px;
  margin-top: 6px;
  font-style: italic;
}

.account-section .form-buttons {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.account-section button[type="submit"] {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.account-section button[type="submit"]:hover {
  background-color: #2980b9;
}

.account-section button[type="submit"]:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

/* Password visibility toggle in account sections */
.account-section .password-input-container {
  position: relative;
}

.account-section .password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
  color: #666;
  transition: color 0.2s;
}

.account-section .password-toggle:hover {
  color: #3498db;
}

/* Success/Error messages for account page */
.account-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.account-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.account-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Mobile adjustments for account page */
@media (max-width: 768px) {
  .account-section {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .account-section .form-buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .account-section button[type="submit"] {
    width: 100%;
    padding: 14px;
  }
}

/* MOBILE RESPONSIVE STYLES - Like Desktop but Optimized */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .auth-section h1 {
    font-size: 2rem;
  }

  .auth-container {
    margin: 20px;
    max-width: none;
  }

  .auth-form {
    padding: 20px;
  }

  .app-header {
    text-align: center;
    flex-direction: column;
  }

  .app-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .user-menu {
    justify-content: center;
    width: 100%;
  }

  .main-nav {
    order: -1;
    width: 100%;
    justify-content: center;
    margin-bottom: 15px;
  }

  .add-book-options {
    flex-direction: column;
    text-align: center;
  }
  
  .divider {
    order: 2;
    padding: 15px 0;
  }
  
  .isbn-lookup {
    order: 1;
  }
  
  .manual-entry {
    order: 3;
  }

  .book-info {
    flex-direction: column;
  }
  
  .book-cover {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .book-cover img {
    max-height: 300px;
    width: auto;
  }
  
  .search-and-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-and-filters input[type="text"] {
    min-width: auto;
  }

  .filter-controls {
    justify-content: space-between;
  }

  .pagination-controls {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .pagination-info {
    order: 1;
    justify-content: center;
  }
  
  .pagination-buttons {
    order: 2;
    justify-content: center;
  }
  
  .page-jump {
    order: 3;
    justify-content: center;
  }

  .collection-info {
    justify-content: center;
  }

  .legend {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* MOBILE TABLE - Like Desktop but Smaller */
  .inventory-table-container {
    max-height: 600px; /* Increased from 500px */
  }
  
  .inventory-table {
    font-size: 11px; /* Slightly smaller than desktop */
    min-width: 900px; /* Allow horizontal scroll but keep all columns */
  }
  
  .inventory-table th, 
  .inventory-table td {
    padding: 8px 4px; /* Slightly smaller padding */
    font-size: 11px;
    line-height: 1.2;
    max-height: 3em; /* Shorter than desktop but still readable */
  }

  /* MOBILE COLUMN WIDTHS - Proportionally smaller but keep all columns */
  .col-cover { width: 60px; min-width: 60px; max-width: 60px; }
  .col-title { width: 120px; min-width: 120px; max-width: 120px; }
  .col-author { width: 100px; min-width: 100px; max-width: 100px; }
  .col-series { width: 100px; min-width: 100px; max-width: 100px; }
  .col-categories { width: 90px; min-width: 90px; max-width: 90px; }
  .col-owner { width: 85px; min-width: 85px; max-width: 85px; }
  .col-location { width: 90px; min-width: 90px; max-width: 90px; }
  .col-status { width: 100px; min-width: 100px; max-width: 100px; }
  .col-group { width: 110px; min-width: 110px; max-width: 110px; }

  .column-filter {
    min-width: 60px;
    max-width: 90px;
    font-size: 9px;
    padding: 2px 3px;
  }

  .header-content span {
    font-size: 10px;
  }
  
  .cover-thumbnail {
    width: 35px;
    height: 50px;
  }

  .page-header {
    flex-direction: column;
    text-align: center;
  }

  .groups-grid {
    grid-template-columns: 1fr;
  }

  .invitation-card {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .invitation-actions {
    justify-content: center;
  }

  /* Mobile pagination adjustments */
  .pagination-btn {
    padding: 8px 10px;
    min-width: 35px;
    font-size: 12px;
  }

  .page-size-selector {
    padding: 6px 8px;
    font-size: 12px;
  }

  .pagination-info {
    font-size: 12px;
  }

  .page-jump {
    font-size: 12px;
  }

  .page-jump input {
    width: 60px;
    padding: 6px;
    font-size: 12px;
  }
}

/* For very small screens - minimal adjustments */
@media (max-width: 480px) {
  .inventory-table {
    min-width: 800px; /* Still keep all columns but allow more scroll */
  }

  .pagination-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }

  .pagination-btn {
    padding: 6px 8px;
    min-width: 30px;
    font-size: 10px;
  }

  .pagination-controls {
    gap: 10px;
  }

  .pagination-info {
    font-size: 11px;
  }

  .page-size-selector {
    font-size: 11px;
    padding: 4px 6px;
  }
}

/* Print Styles */
@media print {
  .auth-section,
  .app-header .main-nav,
  .app-header .user-menu,
  .search-and-filters,
  .pagination-controls,
  .collection-info,
  .column-filter,
  button {
    display: none !important;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .page-content {
    padding: 0;
  }

  .inventory-table-container {
    overflow: visible;
    max-height: none;
  }

  .inventory-table {
    box-shadow: none;
    border: 1px solid #333;
    min-width: auto;
  }

  .inventory-table th, 
  .inventory-table td {
    border: 1px solid #333;
    padding: 8px;
    font-size: 12px;
  }

  .filterable-header .header-content {
    flex-direction: row;
  }

  .header-content span {
    font-size: 12px;
  }

  .inventory-table tbody tr.shared-book {
    background-color: #f0f0f0 !important;
  }
}

/* Enhanced focus states for accessibility */
.column-filter:focus,
.pagination-btn:focus,
.page-jump input:focus,
.page-size-selector:focus {
  outline: 2px solid #3498db;
  outline-offset: 2px;
}

/* Enhanced visual feedback for interactive elements */
.inventory-table tbody tr[style*="cursor: pointer"]:active {
  background-color: #bbdefb !important;
}

/* Series field specific styling in forms */
#series {
  font-style: italic;
}

#series::placeholder {
  font-style: normal;
  opacity: 0.7;
}