body {
  background-color: #0e0b1d;
  color: #eaeaea;
  font-family: 'Segoe UI', sans-serif;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  /* margin-bottom: 2rem; */
  background-color: rgba(20, 15, 35, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.header select {
  background-color: #342355;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 transparent;
}

.header select:hover {
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  border: 1px solid #a855f7;
  background-color: #3b2960;
}

.header select:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(168, 85, 247, 0.45);
}

.container-flex {
  display: flex;
  gap: 3rem;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 3rem 2rem 3rem 2rem;
}

.form-container,
.result-container {
  flex: 1 1 450px;
  max-width: 600px;
  background-color: #1a1333;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.25);
}

h1 {
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  color: #c084fc;
  margin-bottom: 1.5rem;
}

.form-control,
.form-select {
  background-color: #281b44;
  border: none;
  border-radius: 8px;
  color: #eaeaea;
  transition: all 0.3s ease;
}

.form-control:hover,
.form-select:hover {
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
  border: 1px solid #a855f7;
  background-color: #342355;
  color: #eaeaea;
}

.form-control:focus,
.form-select:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 0.25rem rgba(168, 85, 247, 0.55);
  background-color: #3b2960;
  color: #eaeaea;
}

.form-control::placeholder {
  color: #a0a0a0;
}

label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
  color: #d4c1ff;
}

.btn-submit {
  background-color: #a855f7;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: bold;
  width: 100%;
  margin-top: 1rem;
  color: white;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
  background-color: #9333ea;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

pre {
  white-space: pre-wrap;
  background-color: #211c3c;
  padding: 1rem;
  border-radius: 8px;
  color: #f0f0f0;
  font-size: 0.95rem;
}

.video-preview {
  margin-top: 1rem;
  margin-bottom: 1rem;
  max-height: 400px;
}

.status {
  margin-top: 1rem;
  font-weight: bold;
  color: #16f5a0;
  text-align: center;
}

.drop-zone {
  height: 120px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  cursor: pointer;
  flex-direction: column;
}

@media screen and (max-width: 450px) {
  .header {
    padding: 0.75rem 1rem;
  }

  .container-flex {
    padding: 3rem 1rem 3rem 1rem;
  }

  .form-container, .result-container {
    padding: 1.5rem 1rem;
  }
}

/* Modal overlay */
#disclaimerModal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Modal container */
#disclaimerModal .modal-dialog {
  max-width: 500px;
  margin: auto;
  padding: 2rem;
}

#disclaimerModal .modal-content {
  background-color: #1a1333;
  border: none;
  border-radius: 16px;
  color: #eaeaea;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.25);
}

/* Modal title */
#disclaimerModal .modal-header {
  border-bottom: none;
  text-align: center;
  padding-bottom: 0;
}

#disclaimerModal .modal-title {
  color: #c084fc;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto;
}

/* Modal body text */
#disclaimerModal .modal-body {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #e0d3ff;
  text-align: justify;
}

/* Modal footer */
#disclaimerModal .modal-footer {
  border-top: none;
  justify-content: center;
  padding-bottom: 1.5rem;
}

/* Confirm button */
#disclaimerConfirm {
  background-color: #a855f7;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: bold;
  color: #fff;
  font-size: 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#disclaimerConfirm:hover {
  background-color: #9333ea;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.emotion-sortable {
  padding-left: 0;
  list-style: none;
}

.emotion-sortable .list-group-item {
  background-color: #281b44;
  border: 1px solid #3b2960;
  border-radius: 6px;
  margin-bottom: 6px;
  padding: 8px 12px;
  color: #eaeaea;
  cursor: grab;
  user-select: none;
  transition: background-color 0.2s ease;
}

.emotion-sortable .list-group-item:hover {
  background-color: #342355;
}

/* Nền vùng lựa chọn (hiển thị các tag đã chọn) */
.select2-container--default .select2-selection--multiple {
  background-color: #281b44;
  border: 1px solid #a855f7;
  border-radius: 8px;
  color: #eaeaea;
  padding: 4px 6px;
}

/* Viền khi focus */
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border: 1px solid #a855f7;
  box-shadow: 0 0 0 0.2rem rgba(168, 85, 247, 0.45);
}

/* Tag đã chọn */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #3b2960;
  border: 1px solid #a855f7;
  color: #eaeaea;
  border-radius: 6px;
  padding: 3px 8px 3px 15px;
  font-size: 0.875rem;
  margin-top: 0px !important;
  margin-left: 0px !important;
  margin-right: 5px !important;
}

/* Hover tag */
.select2-container--default .select2-selection--multiple .select2-selection__choice:hover {
  background-color: #5b3c7f;
  border-color: #c084fc;
}

/* Nền danh sách dropdown */
.select2-container--default .select2-results > .select2-results__options {
  background-color: #1a1333;
  border: 1px solid #5b3c7f;
}

/* Scrollbar */
.select2-container--default .select2-results__options::-webkit-scrollbar {
  width: 6px;
}
.select2-container--default .select2-results__options::-webkit-scrollbar-thumb {
  background-color: #6b4d8c;
  border-radius: 4px;
}
.select2-container--default .select2-results__options::-webkit-scrollbar-track {
  background-color: #1a1333;
}

/* Mục được hover (highlighted) */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #5b3c7f !important;
  color: white;
}

/* ❗️Fix lỗi item đã chọn có màu xám ❌ */
.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: #342355 !important;
  color: #eaeaea !important;
}

/* Loại bỏ viền dưới trắng */
.select2-dropdown {
  border: none !important;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.select2-container--default .select2-results__option--selected {
  background-color: #342355 !important;
  color: #eaeaea !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  border-right: none !important;
  height: 100%;
}

.nav-links a {
  margin-right: 1.25rem;
  font-size: 1rem;
  font-weight: bold !important; /* Tô đậm */
  color: #a855f7 !important;     /* Màu tím */
  text-decoration: none !important;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:last-child {
  margin-right: 0;
}

.nav-links a:hover {
  color: #c084fc !important;
  text-shadow: 0 0 6px rgba(168, 85, 247, 0.6) !important;
}

/* Nút trải nghiệm bản nâng cấp – MIỄN PHÍ */
.btn-upgrade-free {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: bold;
  background-color: #facc15; /* vàng sáng */
  color: #1a1333 !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
              transform 0.15s ease-in-out;
}

.btn-upgrade-free:hover {
  background-color: #eab308; /* vàng đậm hơn */
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.5);
  transform: translateY(-1px);
}

.btn-upgrade-free:active {
  transform: scale(0.97);
}

/* Wrapper 2 nút */
.btn-dual-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  align-items: flex-end;
}

@media screen and (max-width: 480px) {
  .btn-dual-wrapper {
    flex-direction: column;
  }
}

/* Khối giới thiệu phiên bản nâng cấp ở card bên phải */
.upgrade-highlight {
  margin-top: 1.5rem;
  background: #211c3c;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(250, 204, 21, 0.5); /* vàng nhấn giống btn-paste */
  box-shadow: 0 0 20px rgba(15, 23, 42, 0.6);
}

/* Badge nhỏ phía trên */
.upgrade-badge {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-color: rgba(250, 204, 21, 0.1);
  color: #facc15;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

/* Tiêu đề */
.upgrade-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fde68a;
  margin: 0 0 0.5rem 0;
}

/* Mô tả */
.upgrade-desc {
  font-size: 0.95rem;
  color: #e5e7eb;
  margin-bottom: 0.75rem;
}

/* Danh sách tính năng */
.upgrade-features {
  list-style: none;
  padding-left: 0;
  margin: 0 0 0.75rem 0;
}

.upgrade-features li {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 0.35rem;
}

/* Link xem thêm */
.upgrade-link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #facc15;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.15s ease;
  text-decoration: underline;
}

.upgrade-link-more:hover {
  color: #fde68a;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
  transform: translateY(-1px);
}