/* -------------------------------------------------------------
   ครูณูเอไอ (krunooai) - Custom Design System & Animations
------------------------------------------------------------- */

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

:root {
  --font-main: 'Noto Sans Thai', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Light Theme Variables */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --border-color: rgba(226, 232, 240, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --brand-gradient: linear-gradient(135deg, #1e40af, #4f46e5, #7c3aed);
  --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --card-shadow-hover: 0 20px 30px -8px rgba(37, 99, 235, 0.12), 0 8px 12px -4px rgba(15, 23, 42, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.6);
  --hero-glow: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.12) 0%, rgba(147, 197, 253, 0.04) 50%, transparent 80%);
}

.dark {
  /* Dark Theme Variables */
  --bg-primary: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #151d32;
  --border-color: rgba(30, 41, 59, 0.9);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --brand-gradient: linear-gradient(135deg, #38bdf8, #818cf8, #c084fc);
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 35px -5px rgba(56, 189, 248, 0.15), 0 0 15px rgba(129, 140, 248, 0.2);
  --glass-bg: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(56, 189, 248, 0.18);
  --hero-glow: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.18) 0%, rgba(129, 140, 248, 0.08) 50%, transparent 85%);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
}

/* Glassmorphism Styles */
.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.glass-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
}

.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.dark .glass-card:hover {
  border-color: rgba(56, 189, 248, 0.45);
}

/* Card 4:5 Aspect Ratio (Uniform dimensions for showcase cards) */
.card-ratio-4-5 {
  aspect-ratio: 4 / 5;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

@media (max-width: 640px) {
  .card-ratio-4-5 {
    aspect-ratio: 4 / 5;
    min-height: 390px;
  }
}

/* Gradient Text */
.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero Background Glow */
.hero-glow-bg {
  background-image: var(--hero-glow);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}

/* Hidden Drawer Sidebar Styles */
#sidebar {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.15);
}

.dark #sidebar {
  box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
}

/* Smooth Pulse Animation for AI badge */
@keyframes aiGlowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(129, 140, 248, 0.8);
  }
}

.ai-pulse-glow {
  animation: aiGlowPulse 3s infinite ease-in-out;
}

/* Cloud Floating Animations for Hero Badges */
@keyframes cloudFloat1 {
  0%, 100% {
    transform: translate(0px, 0px);
  }
  50% {
    transform: translate(6px, -10px);
  }
}

@keyframes cloudFloat2 {
  0%, 100% {
    transform: translate(0px, 0px);
  }
  50% {
    transform: translate(-8px, -12px);
  }
}

@keyframes cloudFloat3 {
  0%, 100% {
    transform: translate(0px, 0px);
  }
  50% {
    transform: translate(7px, -8px);
  }
}

@keyframes cloudFloat4 {
  0%, 100% {
    transform: translate(0px, 0px);
  }
  50% {
    transform: translate(-7px, 8px);
  }
}

.animate-cloud-1 {
  animation: cloudFloat1 7s ease-in-out infinite;
}

.animate-cloud-2 {
  animation: cloudFloat2 8.5s ease-in-out infinite;
}

.animate-cloud-3 {
  animation: cloudFloat3 6.5s ease-in-out infinite;
}

.animate-cloud-4 {
  animation: cloudFloat4 7.5s ease-in-out infinite;
}

/* Kru Noo Portrait Interactive Hover Effect */
.portrait-interactive {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
  cursor: pointer;
}

.portrait-interactive:hover {
  transform: translateY(-8px) scale(1.04);
  filter: drop-shadow(0 30px 45px rgba(37, 99, 235, 0.35));
}

.dark .portrait-interactive:hover {
  filter: drop-shadow(0 30px 45px rgba(56, 189, 248, 0.45));
}

/* Video Card Play Button Animation */
.video-play-btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .video-play-btn {
  transform: scale(1.15);
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

/* Award Card Luxury Gold/Indigo Accents */
.award-card {
  position: relative;
  overflow: hidden;
}

.award-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #d97706);
}

/* Admin Dashboard Navigation Tabs */
.admin-tab-btn.active {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.dark .admin-tab-btn.active {
  background-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* Image Upload Dropzone */
.image-upload-dropzone {
  border: 2px dashed #cbd5e1;
  transition: all 0.2s ease;
}

.dark .image-upload-dropzone {
  border-color: #334155;
}

.image-upload-dropzone:hover {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.03);
}

/* Checkerboard pattern for transparent PNG preview */
.checkerboard-bg {
  background-color: #f1f5f9;
  background-image: 
    linear-gradient(45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(-45deg, #e2e8f0 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #e2e8f0 75%), 
    linear-gradient(-45deg, transparent 75%, #e2e8f0 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.dark .checkerboard-bg {
  background-color: #0f172a;
  background-image: 
    linear-gradient(45deg, #1e293b 25%, transparent 25%), 
    linear-gradient(-45deg, #1e293b 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #1e293b 75%), 
    linear-gradient(-45deg, transparent 75%, #1e293b 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}



