/* Flat UI Design System for Book Review Application */
/* Clean, minimal interface with bold colors and simple typography */

/* Basic Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
  color: #2c3e50;
  line-height: 1.6;
  font-weight: 400;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-8 {
  margin-top: 2rem;
}

/* Typography */
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.text-center {
  text-align: center;
}

.text-gray-500 {
  color: #6b7280;
}

.text-gray-600 {
  color: #4b5563;
}

.text-gray-400 {
  color: #9ca3af;
}

/* Flexbox */
.flex {
  display: flex;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

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

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

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

/* Form Styles */
.max-w-2xl {
  max-width: 42rem;
}

.max-w-6xl {
  max-width: 72rem;
}

/* Flat Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease;
  background-color: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  border-color: #3498db;
  background-color: #f8f9fa;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
  color: #95a5a6;
}

/* Flat Form Labels */
label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  display: block;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease;
  background-color: #ffffff;
}

.form-input:focus {
  border-color: #3498db;
  background-color: #f8f9fa;
}

/* Flat Design Buttons */
button, .btn {
  padding: 12px 24px;
  background-color: #3498db;
  color: #ffffff;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

button:hover, .btn:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
}

button:active, .btn:active {
  transform: translateY(0);
}

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

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

.btn-success {
  background-color: #2ecc71;
}

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

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

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

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

/* Flat Card Styles */
.card {
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 24px;
  transition: all 0.2s ease;
}

.card:hover {
  border-color: #3498db;
  transform: translateY(-2px);
}

.border {
  border: 1px solid #e9ecef;
}

.rounded-lg {
  border-radius: 8px;
}

.p-4 {
  padding: 24px;
}

.p-6 {
  padding: 32px;
}

/* Grid */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Responsive Grid */
@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Images */
.w-24 {
  width: 6rem;
}

.h-32 {
  height: 8rem;
}

.object-cover {
  object-fit: cover;
}

.rounded {
  border-radius: 0.25rem;
}

/* Flat Design Color Palette */
.bg-gray-100 {
  background-color: #f8f9fa;
}

.bg-gray-200 {
  background-color: #e9ecef;
}

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

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

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

.bg-success {
  background-color: #2ecc71;
}

.bg-danger {
  background-color: #e74c3c;
}

.bg-warning {
  background-color: #f39c12;
}

.bg-white {
  background-color: #ffffff;
}

/* Links */
a {
  text-decoration: none;
  color: #3b82f6;
}

a:hover {
  text-decoration: underline;
}

.inline-block {
  display: inline-block;
}

.text-white {
  color: #ffffff;
}

.text-secondary {
  color: #95a5a6;
}

.text-primary {
  color: #3498db;
}

.text-xs {
  font-size: 14px;
  line-height: 1rem;
}

.text-center {
  text-align: center;
}

/* Flat Navigation */
nav {
  background-color: #ffffff;
  border-bottom: 2px solid #e9ecef;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  padding: 0 24px;
}

nav a {
  color: #2c3e50;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
  text-decoration: none;
}

nav a:hover {
  background-color: #3498db;
  color: #ffffff;
  text-decoration: none;
}

nav .brand {
  color: #3498db;
  font-weight: 700;
  font-size: 20px;
  padding: 8px 0;
}

nav .brand:hover {
  background-color: transparent;
  color: #2980b9;
}

/* Flash Messages */
.bg-green-100 {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.bg-red-100 {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

/* Line clamp for text truncation */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pagy pagination styles */
.pagy {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin: 1rem 0;
}

.pagy a,
.pagy span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  margin: 0 0.125rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.pagy a {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.pagy a:hover {
  background-color: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
  text-decoration: none;
}

.pagy .current {
  background-color: #3b82f6;
  color: #ffffff;
  border: 1px solid #3b82f6;
}

.pagy .gap {
  min-width: auto;
  height: auto;
  padding: 0 0.5rem;
  color: #6b7280;
  border: none;
}

/* Responsive */
@media (max-width: 640px) {
  .pagy a,
  .pagy span {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
  }

  nav .container {
    flex-direction: column;
    height: auto;
    padding: 1rem;
  }

  nav .container > div {
    margin-top: 0.5rem;
  }
}

/* Modern Login Page Styles */
.login-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  animation: float 6s ease-in-out infinite;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  background: rgba(255, 255, 255, 0.15);
}

.shape-2 {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 10%;
  animation-delay: 2s;
  background: rgba(255, 255, 255, 0.1);
}

.shape-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
  background: rgba(255, 255, 255, 0.2);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.logo-icon {
  font-size: 36px;
  margin-right: 12px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.brand-name {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  letter-spacing: -0.5px;
}

.login-subtitle {
  color: #718096;
  font-size: 14px;
  margin: 0;
  font-weight: 500;
}

.login-form-container {
  margin-bottom: 30px;
}

.form-title {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 8px;
}

.form-subtitle {
  color: #718096;
  font-size: 14px;
  text-align: center;
  margin-bottom: 25px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  padding: 12px 16px 12px 45px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
  color: #a0aec0;
}

.input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #718096;
  z-index: 1;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
}

.checkbox-input {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-text {
  color: #4a5568;
  font-weight: 500;
}

.forgot-link {
  color: #667eea;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #5a67d8;
  text-decoration: underline;
}

.form-actions {
  margin-top: 10px;
}

.login-button {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.5);
}

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

.login-divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.divider-text {
  padding: 0 15px;
  color: #718096;
  font-size: 13px;
  font-weight: 500;
}

.social-login {
  margin-bottom: 25px;
}

.social-title {
  text-align: center;
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 15px;
  font-weight: 600;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  transition: all 0.3s ease;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.social-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2);
}

.social-naver:hover {
  border-color: #03C75A;
  background: rgba(3, 199, 90, 0.05);
}

.social-google:hover {
  border-color: #4285F4;
  background: rgba(66, 133, 244, 0.05);
}

.social-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-text {
  color: #2c3e50;
}

.signup-prompt {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.signup-text {
  color: #718096;
  font-size: 14px;
  margin: 0;
}

.signup-link {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.signup-link:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Mobile Responsive for Login Page */
@media (max-width: 480px) {
  .login-container {
    padding: 10px;
  }

  .login-card {
    padding: 30px 20px;
    border-radius: 15px;
  }

  .brand-name {
    font-size: 24px;
  }

  .logo-icon {
    font-size: 30px;
  }

  .form-title {
    font-size: 20px;
  }

  .social-buttons {
    gap: 10px;
  }

  .form-options {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}