/* Weirdox - Dark Academia Theme */
/* Custom styles to complement Tailwind */

/* ===== CSS Custom Properties ===== */
:root {
  /* Dark Academia Palette */
  --color-forest: #1a2f23;
  --color-forest-light: #2d4a3a;
  --color-gold: #c9a227;
  --color-gold-light: #d4b84a;
  --color-gold-dark: #a68520;
  --color-cream: #f5f0e6;
  --color-cream-dark: #e8e0d0;
  --color-parchment: #faf7f0;
  --color-charcoal: #2d2d2d;
  --color-charcoal-light: #4a4a4a;
  --color-burgundy: #722f37;
  --color-burgundy-light: #8b3d47;
  --color-sage: #87a878;
  --color-ink: #1a1a1a;

  /* Shadows */
  --shadow-academia: 0 4px 20px -2px rgba(26, 47, 35, 0.15);
  --shadow-academia-lg: 0 10px 40px -5px rgba(26, 47, 35, 0.2);
  --shadow-gold: 0 4px 20px -2px rgba(201, 162, 39, 0.3);
}

/* ===== Typography ===== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');

body {
  font-family: 'Lora', Georgia, serif;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--color-forest);
}

.font-display { font-family: 'Playfair Display', Georgia, serif; }
.font-body { font-family: 'Lora', Georgia, serif; }
.font-ui { font-family: 'DM Sans', system-ui, sans-serif; }

/* ===== Paper Texture Overlay ===== */
.paper-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

.paper-texture > * {
  position: relative;
  z-index: 2;
}

/* ===== Button Styles ===== */
.btn {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-ink);
  border: none;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px -3px rgba(201, 162, 39, 0.4);
}

.btn-secondary {
  background: var(--color-forest);
  color: var(--color-cream);
  border: none;
}

.btn-secondary:hover {
  background: var(--color-forest-light);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-forest);
  border: 2px solid var(--color-forest);
}

.btn-outline:hover {
  background: var(--color-forest);
  color: var(--color-cream);
}

.btn-ghost {
  background: transparent;
  color: var(--color-charcoal);
  border: none;
}

.btn-ghost:hover {
  background: var(--color-cream-dark);
}

/* ===== Card Styles ===== */
.card {
  background: var(--color-parchment);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-academia);
  border: 1px solid rgba(26, 47, 35, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-academia-lg);
  transform: translateY(-4px);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-cream-dark);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  background: var(--color-cream);
  border-top: 1px solid var(--color-cream-dark);
}

/* ===== Form Inputs ===== */
.input {
  font-family: 'Lora', Georgia, serif;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-cream-dark);
  border-radius: 0.375rem;
  background: var(--color-parchment);
  color: var(--color-charcoal);
  transition: all 0.2s ease;
  width: 100%;
}

.input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.input::placeholder {
  color: var(--color-charcoal-light);
  opacity: 0.6;
}

.label {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  color: var(--color-forest);
  margin-bottom: 0.5rem;
  display: block;
}

textarea.input {
  min-height: 120px;
  resize: vertical;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232d2d2d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* ===== Navigation ===== */
.nav-link {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 500;
  color: var(--color-cream);
  opacity: 0.85;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-link:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  opacity: 1;
  background: rgba(201, 162, 39, 0.2);
  color: var(--color-gold-light);
}

.nav-link svg {
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.8;
}

/* ===== Status Badges ===== */
.badge {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-pending {
  background: var(--color-cream-dark);
  color: var(--color-charcoal-light);
}

.badge-progress {
  background: rgba(135, 168, 120, 0.2);
  color: var(--color-forest);
}

.badge-submitted {
  background: rgba(201, 162, 39, 0.2);
  color: var(--color-gold-dark);
}

.badge-accepted {
  background: rgba(26, 47, 35, 0.9);
  color: var(--color-cream);
}

.badge-rejected {
  background: rgba(114, 47, 55, 0.2);
  color: var(--color-burgundy);
}

/* ===== Progress Bar ===== */
.progress-bar {
  height: 0.5rem;
  background: var(--color-cream-dark);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-forest) 0%, var(--color-gold) 100%);
  border-radius: 9999px;
  transition: width 0.5s ease;
}

/* ===== Sidebar ===== */
.sidebar {
  background: linear-gradient(180deg, var(--color-forest) 0%, #152419 100%);
  min-height: 100vh;
  width: 280px;
  position: fixed;
  left: 0;
  top: 0;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-cream);
  margin-bottom: 2.5rem;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-gold);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Main Content ===== */
.main-content {
  margin-left: 280px;
  min-height: 100vh;
  padding: 2rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in { animation: fadeIn 0.5s ease-out; }
.animate-slide-up { animation: slideUp 0.5s ease-out; }
.animate-slide-in-left { animation: slideInLeft 0.4s ease-out; }

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===== Utilities ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 50%, var(--color-gold) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gold {
  border-color: var(--color-gold);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-cream-dark), transparent);
  margin: 2rem 0;
}

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

::-webkit-scrollbar-track {
  background: var(--color-cream-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-charcoal-light);
  border-radius: 4px;
}

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

/* ===== AI Generation Button ===== */
.btn-ai {
  background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-forest-light) 100%);
  color: var(--color-cream);
  border: 1px solid var(--color-gold);
  position: relative;
  overflow: hidden;
}

.btn-ai::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn-ai:hover::before {
  left: 100%;
}

.btn-ai:hover {
  box-shadow: 0 0 20px rgba(201, 162, 39, 0.3);
}

/* ===== Loading Spinner ===== */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--color-cream-dark);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Toast Notifications ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--color-parchment);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-academia-lg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideUp 0.3s ease-out;
  z-index: 1000;
}

.toast-success { border-left: 4px solid var(--color-sage); }
.toast-error { border-left: 4px solid var(--color-burgundy); }
.toast-info { border-left: 4px solid var(--color-gold); }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 47, 35, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--color-parchment);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-academia-lg);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-cream-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--color-cream-dark);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
  .main-content {
    margin-left: 240px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 50;
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}
