/* Modern Premium Stylesheet for oU1TS Question Bank SPA */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Theme color palette - Light Mode */
  --background: #fbfbfe;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --primary: #4f46e5;
  --primary-foreground: #ffffff;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #e0e7ff;
  --accent-foreground: #4338ca;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: #4f46e5;
  
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --radius-sm: 0.5rem;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark {
  /* Theme color palette - Dark Mode */
  --background: #09090b;
  --foreground: #fafafa;
  --card: #18181b;
  --card-foreground: #fafafa;
  --popover: #18181b;
  --popover-foreground: #fafafa;
  --primary: #6366f1;
  --primary-foreground: #ffffff;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #1e1b4b;
  --accent-foreground: #c7d2fe;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #27272a;
  --input: #27272a;
  --ring: #6366f1;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background-color: rgba(251, 251, 254, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-smooth);
}

.dark header {
  background-color: rgba(9, 9, 11, 0.8);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
  font-size: 1.35rem;
  font-weight: 800;
  font-family: var(--font-heading);
  transition: var(--transition-smooth);
}

.logo:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.logo-icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted-foreground);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--foreground);
  background-color: var(--muted);
}

.nav-link.active {
  color: var(--primary);
  background-color: var(--accent);
}

.dark .nav-link.active {
  color: var(--primary-foreground);
  background-color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  background-color: var(--ring);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border);
}

.btn-secondary:hover {
  background-color: var(--border);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border-color: var(--border);
}

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

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

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

.btn-icon {
  height: 2.25rem;
  width: 2.25rem;
  padding: 0;
  border-radius: var(--radius-md);
}

/* Theme Toggle Icons */
.theme-toggle .sun-icon {
  display: block;
}
.theme-toggle .moon-icon {
  display: none;
}

.dark .theme-toggle .sun-icon {
  display: none;
}
.dark .theme-toggle .moon-icon {
  display: block;
}

/* Main SPA layout */
main {
  flex: 1;
}

.page-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 5rem 0;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--muted);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }
}

.hero-title span {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  max-width: 42rem;
  margin: 0 auto 2.5rem auto;
  font-size: 1.15rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Grids and Cards */
.features-section {
  padding: 4rem 0;
  background-color: rgba(39, 39, 42, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dark .features-section {
  background-color: rgba(39, 39, 42, 0.2);
}

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

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--muted-foreground);
  max-width: 32rem;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.card {
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  height: 3rem;
  width: 3rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.icon-blue { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.icon-amber { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.icon-green { background-color: rgba(16, 185, 129, 0.1); color: #10b981; }
.icon-purple { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.icon-cyan { background-color: rgba(6, 182, 212, 0.1); color: #06b6d4; }
.icon-rose { background-color: rgba(244, 63, 94, 0.1); color: #f43f5e; }

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card-desc {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Questions Page Components */
.questions-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filter-bar {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .filter-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

.form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.select-control, .input-control {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition-smooth);
}

.select-control:focus, .input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.search-wrapper {
  position: relative;
  display: flex;
}

.search-input {
  width: 100%;
  padding-left: 2.5rem;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

/* Question List Cards */
.question-card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: var(--transition-smooth);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.question-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.question-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.question-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.badge-blue { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.badge-amber { background-color: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.badge-purple { background-color: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.question-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.question-meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.question-action-arrow {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  background-color: var(--accent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.question-card:hover .question-action-arrow {
  opacity: 1;
  transform: scale(1);
}

/* Contributors Page */
.contributors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .contributors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contributors-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.contributor-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.contributor-avatar {
  height: 6rem;
  width: 6rem;
  border-radius: 50%;
  margin: 0 auto 1.25rem auto;
  border: 3px solid var(--border);
  object-fit: cover;
  transition: var(--transition-smooth);
  background-color: var(--muted);
}

.contributor-card:hover .contributor-avatar {
  border-color: var(--primary);
  transform: scale(1.05);
}

.contributor-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.contributor-role {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.contributor-socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.social-link {
  color: var(--muted-foreground);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.social-link:hover {
  color: var(--foreground);
}

/* About & Legal Sidebar Layout */
.sidebar-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .sidebar-layout {
    flex-direction: row;
  }
  
  .sidebar-content {
    flex: 1;
  }
  
  .sidebar-nav {
    width: 250px;
    position: sticky;
    top: 6rem;
    height: fit-content;
  }
}

.about-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.about-header h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.legal-card {
  line-height: 1.7;
}

.legal-card h2 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.legal-card p, .legal-card ul {
  margin-bottom: 1.25rem;
  color: var(--muted-foreground);
}

.legal-card ul {
  padding-left: 1.5rem;
}

/* Contact & Auth Page Forms */
.form-card {
  max-width: 480px;
  margin: 0 auto;
}

.form-title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.form-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.auth-switch span {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
}

/* Upload Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(9, 9, 11, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 550px;
  padding: 2rem;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-backdrop.open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  right: 1.25rem;
  top: 1.25rem;
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  color: var(--foreground);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background-color: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: var(--transition-smooth);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-success {
  border-left: 4px solid #10b981;
}

.toast-success i {
  color: #10b981;
}

/* Footer styling */
footer {
  border-top: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.footer-col ul li a:hover {
  color: var(--foreground);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Mobile Menu & Drawer Styles */
.mobile-menu-toggle {
  display: flex;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer.open {
  opacity: 1;
}

.mobile-drawer-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 300px;
  max-width: 85%;
  background-color: var(--card);
  border-left: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transform: translateX(100%);
  transition: var(--transition-smooth);
}

.mobile-drawer.open .mobile-drawer-content {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-link {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted-foreground);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  color: var(--foreground);
  background-color: var(--muted);
}

.mobile-nav-link.active {
  color: var(--primary);
  background-color: var(--accent);
}

.dark .mobile-nav-link.active {
  color: var(--primary-foreground);
  background-color: var(--primary);
}

.mobile-drawer-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

/* Media Query Overrides */
@media (max-width: 767px) {
  .nav-menu {
    display: none;
  }
  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.95;
  }
}
