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

:root {
  --bg-primary: #0a0d16;
  --bg-secondary: #111524;
  --bg-card: rgba(22, 28, 48, 0.45);
  --bg-card-hover: rgba(30, 39, 66, 0.6);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  --accent-gradient-hover: linear-gradient(135deg, #9d76f7 0%, #f062a9 100%);
  --accent-glow: 0 8px 30px rgba(139, 92, 246, 0.35);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a {
  color: var(--accent-pink);
  text-decoration: none;
  transition: var(--transition-smooth);
}
a:hover {
  color: var(--text-primary);
}

/* Layout Utilities */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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

/* ==================== LANDING & LOGIN CONTAINERS ==================== */
.landing-container, .login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  padding: 2rem;
}

.landing-card, .login-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--card-shadow);
  text-align: center;
  position: relative;
}

.landing-card::before, .login-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--accent-gradient);
  filter: blur(1px);
}

.logo-wrapper {
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  font-size: 2.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-right: 0.5rem;
}

.logo-text {
  font-size: 2.2rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.logo-text span {
  color: var(--accent-pink);
}

.landing-title, .login-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.landing-subtitle, .login-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 2.2rem;
  line-height: 1.55;
}

/* Links Section inside landing page */
.links-section {
  text-align: left;
  border-top: 1px solid var(--border-color);
  padding-top: 1.8rem;
}

.links-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.landing-link-card {
  background: rgba(10, 13, 22, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.landing-link-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.landing-link-card i:first-child {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.landing-link-card div {
  flex-grow: 1;
}

.landing-link-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.landing-link-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.landing-link-card .arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.landing-link-card:hover .arrow {
  color: var(--accent-pink);
  transform: translateX(3px);
}

/* Icon specific theme gradients */
.icon-7w { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.icon-cd { background: rgba(236, 72, 153, 0.15); color: #f472b6; }
.icon-gh { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.icon-se { background: rgba(234, 179, 8, 0.15); color: #facc15; }

/* Login Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.form-input {
  width: 100%;
  background: rgba(10, 13, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: rgba(10, 13, 22, 0.8);
}

.btn-primary {
  width: 100%;
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0.95rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-1px);
  box-shadow: var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(1px);
}

.back-to-landing-btn {
  text-decoration: none;
  transition: var(--transition-smooth);
}

.back-to-landing-btn:hover {
  color: var(--text-primary) !important;
}

.btn-support-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition-smooth);
}

.btn-support-link:hover {
  color: var(--accent-purple);
}

/* ==================== PORTAL LAYOUT ==================== */
.portal-layout, .admin-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.portal-header {
  background: rgba(10, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-product-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

@media (max-width: 768px) {
  .header-product-title {
    display: none; /* Hide product title on mobile headers to avoid clutter */
  }
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-email {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 0.75rem;
  color: var(--accent-pink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Main Container */
.main-content {
  flex-grow: 1;
  padding: 2.5rem 2.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ==================== COURSE DETAIL VIEW ==================== */
.course-detail-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.course-header {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.hero-tag {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 1rem;
}

.course-title-detail {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.course-subtitle-detail {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 800px;
}

/* Detail Columns */
.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
}

@media (max-width: 1024px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.resource-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
}

.section-title {
  font-size: 1.25rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.section-title i {
  color: var(--accent-purple);
}

/* Resource List Items */
.resource-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resource-item {
  background: rgba(10, 13, 22, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.resource-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-hover);
}

.resource-item.active {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.4);
}

.resource-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
}

.resource-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: var(--transition-smooth);
}

.resource-item.active .resource-icon {
  background: var(--accent-purple);
  color: white;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.resource-info {
  overflow: hidden;
}

.resource-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.resource-meta-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.resource-action {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.resource-item:hover .resource-action {
  color: var(--accent-pink);
  transform: translateX(2px);
}

/* Custom Play Icon inside active resource list */
.resource-item.active .resource-action {
  color: var(--accent-purple);
}

/* ==================== CUSTOM AUDIO PLAYER ==================== */
.player-card {
  background: linear-gradient(135deg, rgba(22, 28, 48, 0.8) 0%, rgba(10, 13, 22, 0.9) 100%);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 2.2rem;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.player-artwork {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  background: linear-gradient(45deg, #111524 0%, #1e293b 100%);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.player-artwork-glow {
  position: absolute;
  inset: -10px;
  background: var(--accent-gradient);
  opacity: 0;
  filter: blur(15px);
  z-index: 1;
  transition: var(--transition-smooth);
}

.player-artwork.playing .player-artwork-glow {
  opacity: 0.15;
}

.player-artwork i {
  font-size: 4rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 2;
  position: relative;
  transition: var(--transition-smooth);
}

.player-artwork.playing i {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-5px) scale(1.05); }
  100% { transform: translateY(0px) scale(1); }
}

.player-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-course-name {
  font-size: 0.85rem;
  color: var(--accent-purple);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.8rem;
}

/* Pure CSS Equalizer Visualizer */
.visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 30px;
  width: 120px;
  margin-bottom: 1.5rem;
}

.vis-bar {
  width: 3px;
  height: 5px;
  background: var(--accent-purple);
  border-radius: 3px;
  transition: height 0.15s ease;
}

/* Animated visualizer bars when playing */
.player-artwork.playing ~ .visualizer .vis-bar {
  background: var(--accent-pink);
  animation: equalize 1.2s ease-in-out infinite alternate;
}

.player-artwork.playing ~ .visualizer .vis-bar:nth-child(2) { animation-delay: 0.15s; }
.player-artwork.playing ~ .visualizer .vis-bar:nth-child(3) { animation-delay: 0.3s; }
.player-artwork.playing ~ .visualizer .vis-bar:nth-child(4) { animation-delay: 0.45s; }
.player-artwork.playing ~ .visualizer .vis-bar:nth-child(5) { animation-delay: 0.2s; }
.player-artwork.playing ~ .visualizer .vis-bar:nth-child(6) { animation-delay: 0.35s; }
.player-artwork.playing ~ .visualizer .vis-bar:nth-child(7) { animation-delay: 0.1s; }
.player-artwork.playing ~ .visualizer .vis-bar:nth-child(8) { animation-delay: 0.5s; }

@keyframes equalize {
  0% { height: 4px; }
  100% { height: 28px; }
}

/* Progress Slider */
.player-progress-container {
  width: 100%;
  margin-bottom: 1.5rem;
}

.progress-timeline {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.progress-timeline::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  cursor: pointer;
  border-radius: 10px;
}

.progress-timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-pink);
  box-shadow: 0 0 8px var(--accent-pink);
  cursor: pointer;
  margin-top: -4px;
  transition: var(--transition-smooth);
}

.progress-timeline::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

.player-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Player Action Controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  margin-bottom: 1.5rem;
}

.btn-ctrl {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-ctrl:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn-ctrl.btn-play {
  background: var(--accent-gradient);
  color: white;
  font-size: 1.3rem;
  width: 56px;
  height: 56px;
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.btn-ctrl.btn-play:hover {
  background: var(--accent-gradient-hover);
  transform: scale(1.06);
  box-shadow: var(--accent-glow);
}

/* Player Volume Box */
.volume-control-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 160px;
}

.volume-control-box i {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.volume-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-secondary);
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb:hover {
  background: var(--accent-pink);
}

/* ==================== PDF RESOURCE VIEWER ==================== */
.pdf-viewer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.pdf-icon-large {
  font-size: 4rem;
  color: #ef4444;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.2));
}

.pdf-viewer-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.pdf-viewer-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.pdf-btn-group {
  display: flex;
  gap: 1rem;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

/* Embedded preview layout if selected */
.pdf-embed-container {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: #1e293b;
  margin-top: 1.5rem;
}

.pdf-embed-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==================== ADMIN PANEL WORKSPACE ==================== */
.admin-course-item {
  background: rgba(10, 13, 22, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.admin-course-item:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-hover);
}

.admin-course-meta {
  flex-grow: 1;
}

.admin-course-meta h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.admin-course-meta div {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-course-meta span.route-tag {
  color: var(--accent-purple);
  font-weight: 500;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-action-small {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-action-small:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-action-small.btn-delete {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-action-small.btn-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
}

/* Dynamic Input Builder Rows */
.resource-builder-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.6fr auto;
  gap: 0.5rem;
  align-items: center;
  background: rgba(10, 13, 22, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.5rem;
  border-radius: 8px;
}

.resource-builder-row input {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
}

.btn-row-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.btn-row-remove:hover {
  color: #ef4444;
}

/* ==================== SUPPORT MODAL & OVERLAYS ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: var(--accent-gradient);
}

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

.modal-header h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-smooth);
}

.btn-close:hover {
  color: #ef4444;
  transform: scale(1.1);
}

/* Responsive adjust */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }
  .portal-header {
    padding: 1rem;
  }
  .main-content {
    padding: 1.5rem 1rem;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

/* Drag and Drop Builder Rows */
.resource-builder-row.drag-drop-row {
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
}

.resource-builder-row.drag-drop-row.drag-over {
  border-color: var(--accent-purple) !important;
  background: rgba(139, 92, 246, 0.08) !important;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.btn-upload-trigger {
  border-color: rgba(139, 92, 246, 0.3) !important;
  color: var(--accent-purple) !important;
  background: transparent;
  transition: var(--transition-smooth);
}

.btn-upload-trigger:hover {
  background: rgba(139, 92, 246, 0.1) !important;
  color: var(--text-primary) !important;
  border-color: var(--accent-purple) !important;
}

