/* ==========================================================================
   MyQuizBank Class Portal - Premium Dark Glassmorphism Styling
   ========================================================================== */

:root {
  --bg-dark: #090d16;
  --card-bg: rgba(22, 28, 45, 0.65);
  --card-border: rgba(255, 255, 255, 0.12);
  --card-hover-border: rgba(99, 102, 241, 0.5);
  
  --primary: #6366f1;
  --primary-glow: rgba(99, 102, 241, 0.35);
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-amber: #f59e0b;
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Outfit', 'Noto Sans TC', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background Animated Blobs */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: floatBlob 18s infinite alternate ease-in-out;
}

.blob-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #4f46e5 0%, #7c3aed 100%);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #0284c7 0%, #06b6d4 100%);
  bottom: -150px;
  right: -50px;
  animation-delay: -6s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #db2777 0%, #9333ea 100%);
  top: 40%;
  left: 40%;
  animation-delay: -12s;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* Layout */
.app-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}

/* Glass Header */
.glass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  position: sticky;
  top: 20px;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-icon {
  font-size: 1.6rem;
}

.logo-text .badge {
  font-size: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-glow {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 16px;
  line-height: 1.25;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 36px;
}

/* Search & Filter Box */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.search-filter-box {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  gap: 12px;
}

.search-icon {
  font-size: 1.1rem;
  opacity: 0.6;
}

.search-input-wrapper input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 1rem;
  width: 100%;
  font-family: inherit;
}

.search-input-wrapper input::placeholder {
  color: var(--text-dim);
}

.category-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.chip {
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 12px var(--primary-glow);
}

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin: 20px 0 50px;
  padding: 20px;
}

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

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Main Grid */
.main-content {
  margin-top: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* Student Showcase Card */
.student-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.student-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-hover-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.15);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.student-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.student-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

.student-handle {
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.card-body {
  margin-bottom: 20px;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #e0e7ff;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #c7d2fe;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.visit-link {
  color: #818cf8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.visit-link:hover {
  color: white;
  transform: translateX(4px);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 15, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  width: 100%;
  max-width: 520px;
  padding: 30px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-group input, .input-group select, .input-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  font-size: 0.95rem;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  border-color: var(--primary);
  outline: none;
}

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

.footer {
  text-align: center;
  padding: 40px 0 20px;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .glass-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .stats-bar {
    gap: 20px;
  }
}
