@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.8);
  --text: #0f172a;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  text-align: center;
  margin-bottom: 3rem;
}

.header h1 {
  font-size: 3rem;
  font-weight: 800;
  background: -webkit-linear-gradient(#2563eb, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-bottom: 2rem;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.upload-form input[type="file"] {
  padding: 1rem;
  border: 2px dashed #93c5fd;
  border-radius: 0.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.upload-form input[type="file"]:hover {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.8);
}

.btn {
  background: var(--primary);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.5);
  text-decoration: none;
  display: inline-block;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.6);
}

.catalogues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.catalogue-item {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.catalogue-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.catalogue-icon {
  font-size: 4rem;
  color: #ef4444;
  margin-bottom: 1rem;
}

.catalogue-title {
  font-weight: 600;
  margin-bottom: 1.5rem;
  word-break: break-all;
  color: #333;
}

/* Viewer specific styles */
.viewer-body {
  background: #1e293b;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.viewer-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.viewer-header h1 {
  color: white;
  font-size: 1.25rem;
  margin: 0;
}

.viewer-header .btn {
  background: #475569;
  box-shadow: none;
}

.viewer-header .btn:hover {
  background: #64748b;
}

.flipbook-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
}

.flipbook {
  box-shadow: 0 0 30px rgba(0,0,0,0.8);
  border-radius: 4px;
}

.page {
  background-color: white;
  border: solid 1px hsl(0, 0%, 80%);
  overflow: hidden;
}

.page-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-content canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.controls {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  z-index: 10;
}

.btn-icon {
  background: transparent;
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.btn-icon:hover {
  color: var(--primary);
}
