:root {
  --ease-spring: cubic-bezier(0.19, 1, 0.22, 1);
  /* แก้ไข: เปลี่ยนเป็นโทนฟ้า-น้ำเงิน (Cyan -> Blue -> Deep Indigo) */
  --brand-gradient: linear-gradient(135deg, #06b6d4, #3b82f6, #4f46e5); 
  
  /* แก้ไข: เปลี่ยนสี Neon Accent เป็นสีฟ้าสว่าง (Cyan) */
  --neon-accent: #22d3ee;
  --accent-blue: #3b82f6;
  
  --panel-radius: 40px;
  --card-width: 260px;
  --card-height: 400px;
  --safe-bottom: calc(env(safe-area-inset-bottom, 20px) + 16px);
  
  /* แก้ไข: Liquid Glass - เพิ่มความโปร่งใส ลดความทึบของพื้นหลัง */
  --glass-surface: rgba(15, 23, 42, 0.30); 
  /* แก้ไข: ปรับขอบให้ดูมีความเป็นแก้วมากขึ้น */
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shine: inset 0 1px 0 0 rgba(255, 255, 255, 0.2);
  
  --text-main: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.75);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; user-select: none; }

body {
  margin: 0; background: #000; font-family: 'Plus Jakarta Sans', 'Sarabun', sans-serif;
  color: var(--text-main); height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
}

#canvas-container { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

#landing-stage {
  z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; 
  width: 100%; height: 100%; padding-bottom: 120px;
  transition: transform 0.8s var(--ease-spring), opacity 0.4s ease;
}
body.panel-open #landing-stage { transform: scale(0.92) translateY(-20px); opacity: 0; pointer-events: none; }

.brand-group { text-align: center; margin-bottom: 2rem; display: flex; flex-direction: column; align-items: center; }

/* แก้ไข: ปรับเงา Mascot เป็นโทนฟ้า */
.mascot-hero { width: auto; height: auto; max-width: 280px; max-height: 25vh; margin-bottom: 1.5rem; filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.4)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.txt-partners {
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(3rem, 10vw, 4.5rem); font-weight: 800; letter-spacing: -0.05em;
  color: white; 
  /* แก้ไข: Text Shadow เป็นโทนน้ำเงิน/ฟ้า */
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(6, 182, 212, 0.3);
  margin: 0; line-height: 1;
}
/* แก้ไข: Text Shadow เป็นโทนฟ้า */
.brand-desc { font-size: 0.9rem; color: var(--neon-accent); margin-top: 10px; font-weight: 400; letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 0 10px rgba(6, 182, 212, 0.4); }

.trigger-btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px 48px; border-radius: 100px; color: white; font-weight: 600; font-size: 1rem;
  /* แก้ไข: เงาปุ่มโทนฟ้า */
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
  cursor: pointer; transition: all 0.3s ease;
}
/* แก้ไข: Hover Effect โทนฟ้า */
.trigger-btn:hover { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.5); transform: translateY(-2px); box-shadow: 0 0 30px rgba(59, 130, 246, 0.3); }
.trigger-btn:active { transform: scale(0.96); }

#backdrop-layer { 
  position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.5s ease; 
}
body.panel-open #backdrop-layer { opacity: 1; pointer-events: auto; }

#onboarding-panel {
  position: fixed; bottom: 0; left: 0; right: 0; height: 85dvh; 
  background: var(--glass-surface);
  border-top-left-radius: var(--panel-radius); border-top-right-radius: var(--panel-radius);
  border-top: 1px solid var(--glass-border); 
  /* แก้ไข: เพิ่ม Shine Effect ด้านบนให้ดูเป็นแก้ว */
  box-shadow: 0 -20px 80px rgba(0,0,0,0.8), var(--glass-shine);
  z-index: 100; transform: translate3d(0, 105%, 0); transition: transform 0.7s var(--ease-spring);
  /* แก้ไข: เพิ่ม Blur ให้สูงขึ้นเพื่อความเป็น Liquid Glass */
  backdrop-filter: blur(50px) saturate(180%); display: flex; flex-direction: column;
}
body.panel-open #onboarding-panel { transform: translate3d(0, 0, 0); }

.panel-handle { width: 100%; padding: 20px 0 0; display: flex; justify-content: center; flex-shrink: 0; }
.handle-bar { width: 48px; height: 5px; background: rgba(255,255,255,0.2); border-radius: 10px; }

.flow-container { flex: 1; position: relative; padding: 0 24px var(--safe-bottom); display: flex; flex-direction: column; overflow: hidden; }

.flow-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; margin-top: 15px; opacity: 0; transform: translateY(10px); transition: 0.5s 0.3s; }
body.panel-open .flow-header { opacity: 1; transform: translateY(0); }
.progress-track { width: 60px; height: 4px; background: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; }
/* แก้ไข: เงา Progress Bar */
.progress-fill { width: 0%; height: 100%; background: var(--brand-gradient); transition: width 0.5s var(--ease-spring); box-shadow: 0 0 10px rgba(59, 130, 246, 0.5); }
.step-counter { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

.card-stack { position: relative; flex: 1; display: grid; place-items: center; perspective: 1000px; padding-top: 20px; }
.flow-card {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  opacity: 0; transform: translate3d(20px, 0, 0); pointer-events: none; text-align: center; transition: all 0.5s var(--ease-spring);
}
.flow-card.active { opacity: 1; transform: translate3d(0, 0, 0); pointer-events: auto; }
.flow-card.exit { opacity: 0; transform: translate3d(-20px, 0, 0); }

/* แก้ไข: เงาตัวหนังสือ Title */
.card-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; color: white; font-family: 'Plus Jakarta Sans', sans-serif; letter-spacing: -0.02em; text-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
.card-subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.5; max-width: 90%; }

/* แก้ไข: เงาของรูปประกอบ */
.step-img { width: auto; height: auto; max-height: 22vh; margin-bottom: 25px; object-fit: contain; filter: drop-shadow(0 0 25px rgba(6, 182, 212, 0.25)); }

.modern-input {
  width: 100%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
  padding: 18px; border-radius: 18px; color: white; font-size: 1.1rem; text-align: center; transition: 0.3s;
}
/* แก้ไข: Input Focus สีฟ้า */
.modern-input:focus { border-color: var(--neon-accent); background: rgba(6, 182, 212, 0.08); box-shadow: 0 0 15px rgba(6, 182, 212, 0.2); }

.carousel-wrapper { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }

.style-carousel {
    display: flex; overflow-x: auto; gap: 20px; width: 100vw; 
    margin-left: -24px; padding: 20px calc(50vw - 130px) 40px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    align-items: center; z-index: 10;
}
.style-carousel::-webkit-scrollbar { display: none; }

.style-card {
    flex: 0 0 var(--card-width); height: var(--card-height); background: #000; border-radius: 28px; position: relative;
    scroll-snap-align: center; scroll-snap-stop: always; border: 1px solid rgba(255,255,255,0.15); overflow: hidden;
    transition: transform 0.4s var(--ease-spring), box-shadow 0.4s ease;
}
/* แก้ไข: Selected Card Glow สีฟ้า */
.style-card.selected {
    border-color: var(--neon-accent); transform: scale(1.05); z-index: 20;
    box-shadow: 0 15px 50px rgba(6, 182, 212, 0.3);
}

.media-layer { position: absolute; inset: 0; background: #000; }
.media-layer img, .media-layer video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: opacity 0.5s; }
.media-layer img { opacity: 1; }
.media-layer video { opacity: 0; }
.style-card.selected .media-layer img { opacity: 0; }
.style-card.selected .media-layer video { opacity: 1; }

.card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 80px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent); pointer-events: none; transition: opacity 0.3s;
}
.overlay-title { font-size: 1.4rem; font-weight: 700; color: white; margin-bottom: 4px; text-shadow: 0 0 10px rgba(0,0,0,0.5); }
.overlay-desc { font-size: 0.85rem; color: rgba(255,255,255,0.8); line-height: 1.3; }
.style-card.selected .card-overlay { opacity: 0; }

.carousel-controls { display: flex; align-items: center; gap: 20px; margin-top: -10px; z-index: 20; }
.nav-arrow { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); display: grid; place-items: center; color: white; cursor: pointer; backdrop-filter: blur(5px); transition: 0.2s; }
.nav-arrow:active { transform: scale(0.9); background: rgba(255,255,255,0.1); }
.dots-indicator { display: flex; gap: 8px; }
.dot-nav { width: 6px; height: 6px; background: rgba(255,255,255,0.2); border-radius: 50%; transition: 0.3s var(--ease-spring); }
/* แก้ไข: Dot Indicator สีฟ้า */
.dot-nav.active { width: 24px; background: var(--neon-accent); border-radius: 10px; box-shadow: 0 0 10px rgba(6, 182, 212, 0.5); }

.numpad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; max-width: 300px; margin: 10px auto 0; }
.num-btn {
    aspect-ratio: 1.4; background: rgba(255,255,255,0.05); border-radius: 16px; border: 1px solid rgba(255,255,255,0.08);
    font-size: 1.5rem; color: white; display: grid; place-items: center; cursor: pointer; transition: 0.1s;
}
/* แก้ไข: Numpad Active สีฟ้า */
.num-btn:active { background: rgba(59, 130, 246, 0.2); transform: scale(0.95); border-color: var(--neon-accent); }

.pin-display { display: flex; justify-content: center; gap: 16px; margin-bottom: 1.5rem; height: 16px; }
.pin-circle { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); transition: 0.3s; }
.pin-circle.filled { background: var(--neon-accent); border-color: var(--neon-accent); transform: scale(1.2); box-shadow: 0 0 10px var(--neon-accent); }

.action-bar { display: flex; gap: 12px; margin-top: auto; padding-top: 10px; opacity: 0; transform: translateY(20px); transition: 0.5s 0.6s; }
body.panel-open .action-bar { opacity: 1; transform: translateY(0); }
.btn-action { height: 56px; border-radius: 16px; border: none; font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.2s; font-family: inherit; }
/* แก้ไข: ปุ่ม Next สีฟ้า */
.btn-next { flex: 1; background: var(--brand-gradient); color: white; box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3); border: 1px solid rgba(255,255,255,0.2); }
.btn-next:active { transform: scale(0.98); }
.btn-next:disabled { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.2); box-shadow: none; border-color: transparent; }
.btn-back { width: 56px; background: rgba(255,255,255,0.05); color: white; border: 1px solid rgba(255,255,255,0.15); }
.hidden { display: none !important; }

.ui-fade-out { opacity: 0 !important; pointer-events: none; transition: opacity 1s ease; }
