@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;500;600;700&family=IBM+Plex+Sans+Thai:wght@400;500;600&display=swap');

:root {
  /* Color Palette - Safe Harbor Theme */
  --bg-dark: #16292f;
  --bg-deep: #16292f;
  --surface: #1d3640;
  --surface-border: rgba(122, 200, 188, 0.25);
  --surface-glow: rgba(77, 182, 164, 0.18);
  
  --primary: #4db6a4;     /* Mint/Teal Accent */
  --secondary: #7ac8bc;   /* Jade Accent */
  --accent: #7ac8bc;
  
  --color-positive: #8bd3a0;
  --color-caution: #e6b86b;
  --color-danger: #ff9c9c;
  --color-ink: #eef7f4;
  
  --text-primary: #eef7f4;
  --text-muted: #8fb3aa;
  
  /* Font Stacks */
  --font-heading: 'Kanit', sans-serif;
  --font-body: 'IBM Plex Sans Thai', sans-serif;
  
  /* Layout tokens */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --glow-shadow: 0 0 20px rgba(77, 182, 164, 0.3);
}

/* Base resets & styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% -20%, rgba(77, 182, 164, 0.2) 0%, transparent 60%),
    radial-gradient(circle at 10% 20%, rgba(29, 54, 64, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(25, 48, 56, 0.5) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

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

/* Glassmorphism Containers */
.glass-panel {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.05);
}

/* Core Button Styles */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--primary);
  color: #0e1a1f;
  box-shadow: 0 6px 18px rgba(77, 182, 164, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(77, 182, 164, 0.45);
}

.btn-secondary {
  background: var(--secondary);
  color: #0e1a1f;
  box-shadow: 0 6px 18px rgba(122, 200, 188, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(122, 200, 188, 0.45);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(77, 182, 164, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* Inputs and Forms */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Neon Text Accents */
.text-gradient-cyan {
  background: linear-gradient(to right, var(--primary), #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-magenta {
  background: linear-gradient(to right, var(--secondary), #d946ef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-glow {
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pulse Animation */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
  }
}

.pulse-active {
  animation: pulse-glow 2s infinite ease-in-out;
}

/* Persistent Safe-Zone Pass Styles */
.safe-zone-btn {
  background: linear-gradient(135deg, #10b981, #059669); /* Rich green */
  color: #fff;
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.safe-zone-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Card Flip Visuals */
.card-container {
  perspective: 1000px;
}

.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.flip-card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-front {
  background: linear-gradient(135deg, #110c22 0%, #1e133c 100%);
  border: 2px solid var(--surface-border);
}

.card-back {
  background: linear-gradient(135deg, #1f1235 0%, #0d061c 100%);
  border: 2px solid var(--primary);
  transform: rotateY(180deg);
}
