/* ==========================================================================
   SCiUS KU NEWYEAR 27 - Responsive Date Picker Application
   Primary Color Theme: #1D3323 (Forest Green)
   Typography: Mitr (Google Fonts)
   Exact match to reference mockup (Image Reference)
   ========================================================================== */

:root {
  --primary: #1D3323;
  --primary-rgb: 29, 51, 35;
  --primary-light: #2D4C36;
  --primary-dark: #122217;
  --primary-accent: #3A6346;
  --text-main: #1D3323;
  --text-muted: #6B7B6E;
  --text-faded: #8E9C91;

  --track-gray: #D9D9D9;
  --card-glass-bg: rgba(255, 255, 255, 0.44);
  --card-glass-border: rgba(255, 255, 255, 0.72);
  --card-shadow: 0 16px 36px rgba(29, 51, 35, 0.10);

  --input-bg: #FFFFFF;
  --input-radius: 11px;
  --input-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);

  --font-main: 'Mitr', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Mitr', var(--font-main);
  --font-code: 'Fira Code', 'Courier New', monospace;

  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   Reset & Page Fixed Confinement
   CRITICAL: Outside MUST NOT scroll at all.
   Only inside the rectangular card (.glass-card) can scroll!
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden !important; /* Outside MUST NOT scroll */
  position: fixed;
  inset: 0;
  font-family: var(--font-main);
  color: var(--text-main);
  background-color: #E2E8D8;
  user-select: none;
}

/* --------------------------------------------------------------------------
   Fixed Background Layers (herocom.png & herophone.png)
   -------------------------------------------------------------------------- */
.bg-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 1;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.4s ease;
}

.bg-desktop {
  background-image: url('assets/herocom.png');
  background-size: cover;
  opacity: 1;
}

.bg-mobile {
  background-image: url('assets/herophone.png');
  background-size: cover;
  background-position: center top;
  opacity: 0;
}

/* --------------------------------------------------------------------------
   App Viewport Shell
   -------------------------------------------------------------------------- */
.app-viewport {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden !important;
}

/* --------------------------------------------------------------------------
   DESKTOP (COM) LAYOUT - EXACT ALIGNMENT TO REFERENCE IMAGE
   The card & header are anchored at left ~ 6% - 8%, exactly matching the mockup.
   -------------------------------------------------------------------------- */
.inner-frame {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0 0 max(6vw, calc((100vw - 1280px) / 2 + 40px));
  overflow: hidden !important;
}

.main-content-column {
  width: 575px;
  max-width: 575px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   DESKTOP FLOATING ASSETS ON THE RIGHT
   Positioned precisely in the open sky/hills area as in Reference Image:
   - Calendar: Top Right
   - Book: Lower Left of Calendar
   - Clock: Lower Right of Calendar
   -------------------------------------------------------------------------- */
.desktop-floats {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  display: block;
}

.float-item {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 12px 20px rgba(29, 51, 35, 0.16));
  user-select: none;
}

/* Calendar (Top-Right) */
.d-calendar {
  width: 220px;
  height: auto;
  top: 9%;
  right: 7%;
  transform: rotate(11deg);
  animation: floatDesktopCal 6s ease-in-out infinite;
}

/* Book (Middle, lower-left of calendar) */
.d-book {
  width: 132px;
  height: auto;
  top: 39%;
  right: 23%;
  transform: rotate(-11deg);
  animation: floatDesktopBook 7s ease-in-out infinite;
}

/* Clock (Lower-right of calendar) */
.d-clock {
  width: 135px;
  height: auto;
  top: 41%;
  right: 5%;
  transform: rotate(-8deg);
  animation: floatDesktopClock 6.4s ease-in-out infinite;
}

@keyframes floatDesktopCal {
  0%, 100% { transform: translateY(0px) rotate(11deg); }
  50% { transform: translateY(-7px) rotate(9.5deg); }
}

@keyframes floatDesktopBook {
  0%, 100% { transform: translateY(0px) rotate(-11deg); }
  50% { transform: translateY(-6px) rotate(-13deg); }
}

@keyframes floatDesktopClock {
  0%, 100% { transform: translateY(0px) rotate(-8deg); }
  50% { transform: translateY(-6px) rotate(-6deg); }
}

.mobile-top-graphics {
  display: none;
}

/* --------------------------------------------------------------------------
   HEADER SECTION (Centered relative to card)
   -------------------------------------------------------------------------- */
.event-header {
  margin-bottom: 12px;
  text-align: center;
  flex-shrink: 0;
  width: 100%;
}

.sub-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 0px;
}

.main-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.15;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.title-scius {
  letter-spacing: 0.3px;
}

.title-year {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   GLASSMORPHIC CARD (Exact match to Reference Image)
   "ตอนเลื่อน เลื่อนแค่ในกรอบสี่เหลี่ยม ด้านนอกห้ามเลื่อนเลย"
   -------------------------------------------------------------------------- */
.glass-card {
  width: 100%;
  background: var(--card-glass-bg);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  border: 1.5px solid var(--card-glass-border);
  border-radius: 24px;
  box-shadow: var(--card-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  padding: 22px 28px 22px;
  position: relative;

  /* ONLY THIS CARD SCROLLS IF CONTENT EXCEEDS VIEWPORT */
  max-height: calc(100dvh - 150px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* HIDE SCROLLBAR COMPLETELY (Maintain full scrolling functionality without visual bar) */
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE & Edge */
}

/* Hide scrollbar for Chrome, Safari, Opera, Edge across all elements */
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* Progress Bar & Percentage */
.progress-section {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.progress-track {
  flex: 1;
  height: 11px;
  background-color: var(--track-gray);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary);
  border-radius: 9999px;
  transition: width var(--transition-normal);
}

.progress-percent {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  min-width: 38px;
  text-align: right;
}

/* Form Groups */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.glass-input {
  width: 100%;
  height: 38px;
  background: var(--input-bg);
  border: none;
  border-radius: var(--input-radius);
  padding: 0 16px;
  font-family: var(--font-main);
  font-size: 14.5px;
  color: var(--primary);
  box-shadow: var(--input-shadow);
  transition: all var(--transition-fast);
  user-select: text;
}

.glass-input:focus {
  outline: none;
  box-shadow: 0 0 0 2.5px rgba(var(--primary-rgb), 0.25);
}

/* Row 2: Nickname & Room */
.fields-row {
  display: grid;
  grid-template-columns: 1fr 115px;
  gap: 16px;
  margin-bottom: 14px;
}

/* Room Dropdown Pill ("ม.   /") */
.room-pill {
  width: 125px;
  height: 38px;
  background: var(--input-bg);
  border: none;
  border-radius: var(--input-radius);
  box-shadow: var(--input-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.room-pill:focus-within {
  box-shadow: 0 0 0 2.5px rgba(var(--primary-rgb), 0.25);
}

.room-prefix {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  user-select: none;
  flex-shrink: 0;
}

.room-slash {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  user-select: none;
  margin: 0 4px;
  flex-shrink: 0;
}

.room-select {
  flex: 1;
  min-width: 24px;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 0 2px;
}

.room-select:focus {
  outline: none;
}

.room-select option {
  background: #FFFFFF;
  color: var(--primary);
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 600;
  padding: 6px 12px;
}

/* Divider Line */
.form-divider {
  border: none;
  height: 1.5px;
  background-color: var(--primary);
  margin: 14px 0 14px;
  opacity: 0.9;
}

.form-divider-bottom {
  display: none;
}

/* Calendar Row Layout */
.calendar-layout-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
}

.calendar-meta-col {
  padding-top: 24px;
}

.section-heading {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 2px;
}

.section-subheading {
  font-size: 11px;
  color: var(--primary);
  font-weight: 300;
  opacity: 0.9;
}

/* Calendar Widget */
.calendar-widget {
  width: 100%;
}

.calendar-month-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 4px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 2px;
  text-align: center;
}

.cal-day {
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--primary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.cal-day.muted-day {
  color: #7A897D;
  opacity: 0.55;
  cursor: default;
}

.cal-day:not(.muted-day):hover {
  background: rgba(29, 51, 35, 0.12);
  transform: scale(1.08);
}

.cal-day.selected {
  background-color: #556E5A;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(29, 51, 35, 0.28);
  transform: scale(1.05);
}

/* Button: ตรวจสอบข้อมูล */
.form-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.btn-check {
  width: 200px;
  height: 38px;
  background: #FFFFFF;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(29, 51, 35, 0.12);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-check:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(29, 51, 35, 0.2);
  background: #FDFDFD;
}

.btn-check:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(29, 51, 35, 0.15);
}

/* ==========================================================================
   PORTRAIT / PHONE LAYOUT (Exact match to Phone Reference)
   ========================================================================== */
@media (orientation: portrait), (max-width: 820px) {
  .bg-desktop {
    opacity: 0;
  }

  .bg-mobile {
    opacity: 1;
  }

  .desktop-floats {
    display: none;
  }

  .inner-frame {
    padding: 8px 12px 14px;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    overflow: hidden !important;
  }

  .main-content-column {
    width: 360px;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden !important;
  }

  /* Mobile Top Graphics Area */
  .mobile-top-graphics {
    display: block;
    position: relative;
    width: 100%;
    max-width: 340px;
    height: 135px;
    margin-top: 6px;
    margin-bottom: 4px;
    flex-shrink: 0;
  }

  .m-calendar {
    width: 125px;
    height: auto;
    left: 50%;
    top: 2px;
    transform: translateX(-50%) rotate(-8deg);
    animation: floatPhoneCenter 6s ease-in-out infinite;
    z-index: 2;
  }

  .m-clock {
    width: 54px;
    height: auto;
    left: 14px;
    top: 70px;
    transform: rotate(-12deg);
    animation: floatPhoneLeft 5.5s ease-in-out infinite;
    z-index: 1;
  }

  .m-book {
    width: 62px;
    height: auto;
    right: 14px;
    top: 72px;
    transform: rotate(14deg);
    animation: floatPhoneRight 6.5s ease-in-out infinite;
    z-index: 1;
  }

  @keyframes floatPhoneCenter {
    0%, 100% { transform: translateX(-50%) translateY(0px) rotate(-8deg); }
    50% { transform: translateX(-50%) translateY(-6px) rotate(-6deg); }
  }

  @keyframes floatPhoneLeft {
    0%, 100% { transform: translateY(0px) rotate(-12deg); }
    50% { transform: translateY(-5px) rotate(-15deg); }
  }

  @keyframes floatPhoneRight {
    0%, 100% { transform: translateY(0px) rotate(14deg); }
    50% { transform: translateY(-5px) rotate(11deg); }
  }

  /* Mobile Header */
  .event-header {
    text-align: center;
    margin-bottom: 8px;
    flex-shrink: 0;
  }

  .sub-title {
    font-size: 16px;
    font-weight: 500;
  }

  .main-title {
    font-size: 22px;
  }

  .title-year {
    font-size: 32px;
  }

  /* Glass Card on Mobile - THE ONLY SCROLLING ELEMENT! */
  .glass-card {
    width: 100%;
    max-width: 342px;
    flex: 1;
    min-height: 0;
    max-height: calc(100dvh - 225px);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 16px 18px 18px;
    border-radius: 24px;
  }

  .progress-section {
    margin-bottom: 12px;
  }

  /* Stack inputs on Mobile */
  .fields-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
  }

  .field-room .room-pill {
    width: 135px;
  }

  /* Calendar in Mobile */
  .calendar-layout-row {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .calendar-meta-col {
    padding-top: 0;
    text-align: left;
  }

  .section-heading {
    font-size: 15.5px;
  }

  .section-subheading {
    font-size: 10.5px;
    margin-bottom: 4px;
  }

  .form-divider-bottom {
    display: block;
    margin: 12px 0 14px;
  }

  .btn-check {
    width: 100%;
    max-width: 250px;
    height: 38px;
    font-size: 15px;
  }
}

/* ==========================================================================
   POPUP MODAL & CONFIRMATION DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(18, 34, 23, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease-out;
}

.modal-overlay[hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.modal-card {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(18, 34, 23, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-json {
  max-width: 600px;
}

.modal-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid rgba(29, 51, 35, 0.08);
  position: relative;
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(29, 51, 35, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.modal-icon-badge.success {
  background: rgba(39, 174, 96, 0.15);
}

.modal-titles {
  flex: 1;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}

.modal-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 8px;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(29, 51, 35, 0.08);
  color: var(--primary);
}

.modal-body {
  padding: 20px 24px;
  max-height: 65vh;
  overflow-y: auto;
}

/* Summary Grid within Modal */
.summary-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-item {
  background: rgba(29, 51, 35, 0.04);
  border: 1px solid rgba(29, 51, 35, 0.08);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-item-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.summary-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.summary-value {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--primary);
}

.summary-date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-count-badge {
  background: var(--primary);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
}

/* Modal Mini Calendar Preview */
.modal-calendar-preview {
  margin-top: 10px;
  margin-bottom: 8px;
  background: #FFFFFF;
  border: 1px solid rgba(29, 51, 35, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.modal-cal-month {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
}

.modal-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 4px;
}

.modal-cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.modal-cal-day {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--primary);
  border-radius: 4px;
}

.modal-cal-day.muted-day {
  color: #8E9C91;
  opacity: 0.45;
}

.modal-cal-day.selected {
  background-color: var(--primary);
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(29, 51, 35, 0.28);
  border-radius: 5px;
}

.selected-dates-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.date-tag {
  background: #FFFFFF;
  border: 1px solid rgba(29, 51, 35, 0.15);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Modal Actions */
.modal-footer {
  padding: 16px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(29, 51, 35, 0.08);
}

.btn-primary, .btn-secondary {
  height: 42px;
  padding: 0 20px;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 12px rgba(29, 51, 35, 0.25);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(29, 51, 35, 0.3);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--primary);
  border: 1px solid rgba(29, 51, 35, 0.2);
}

.btn-secondary:hover {
  background: rgba(29, 51, 35, 0.05);
}

/* ==========================================================================
   JSON DISPLAY MODAL STYLING
   ========================================================================== */
.json-meta-status {
  background: rgba(46, 204, 113, 0.12);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #1b6337;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.status-indicator {
  color: #27ae60;
  font-size: 12px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.code-container {
  background: #18241C;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.code-top-bar {
  background: #121C16;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-filename {
  font-family: var(--font-code);
  font-size: 12px;
  color: #9AB29F;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #E2ECE5;
  font-family: var(--font-main);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.json-code-view {
  padding: 16px;
  max-height: 280px;
  overflow-y: auto;
  font-family: var(--font-code);
  font-size: 12.5px;
  line-height: 1.5;
  color: #D3E2D7;
  user-select: text;
}

/* Syntax Highlighting */
.json-key { color: #8BE9FD; }
.json-string { color: #50FA7B; }
.json-number { color: #FFB86C; }
.json-boolean { color: #BD93F9; }
.json-null { color: #FF5555; }

/* ==========================================================================
   TOAST NOTIFICATION COMPONENT
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(29, 51, 35, 0.94);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 400;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.25s 2.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.warning {
  background: rgba(180, 83, 9, 0.94);
}

.toast.success {
  background: rgba(22, 101, 52, 0.94);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
  }
}

/* Input Shake Animation for Error Validation */
@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.input-error {
  animation: inputShake 0.35s ease;
  border-color: #E74C3C !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.25) !important;
}
