/* STREAMING_CHUNK:Defining global variables and core styles... /
/ =========================================
NS LOGHAT DICTIONARY - CORE STYLES
========================================= */

:root {
  --ns-yellow: #ffd200;
  --ns-red: #ed1c24;
  --ns-black: #111111;
  --ns-bg: #f8f9fa;
  --ns-border: #e1e4e8;
  --ns-text: #333333;
  --ns-text-light: #666666;
  --ns-success: #2ecc71;
  --ns-error: #e74c3c;
}

.ns-loghat-container,
.ns-loghat-archive {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--ns-text);
}

/* Base Button */
.ns-loghat-container .button,
.ns-loghat-archive .button {
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  border: 2px solid var(--ns-border);
  color: var(--ns-text);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 700;
  transition: all 0.2s;
  cursor: pointer;
}

.ns-loghat-container .button:hover,
.ns-loghat-archive .button:hover {
  border-color: var(--ns-black);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* STREAMING_CHUNK:Styling the live search interface... /
/ =========================================
LIVE SEARCH
========================================= */
.ns-search-wrapper {
  position: relative;
  width: calc(100% - 20px);
  max-width: 600px;
  margin: 0 auto 30px auto;
  box-sizing: border-box;
}

.ns-search-input {
  box-sizing: border-box;
  width: 100%;
  padding: 15px 20px;
  font-size: 1.1rem;
  border: 3px solid var(--ns-black);
  border-radius: 50px;
  outline: none;
  transition: all 0.2s;
  box-shadow: 4px 4px 0 var(--ns-border);
}

.ns-search-input:focus {
  box-shadow: 4px 4px 0 var(--ns-yellow);
}

.ns-search-results {
  position: absolute;
  box-sizing: border-box;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid var(--ns-black);
  border-radius: 12px;
  margin-top: 10px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: none;
  max-height: 300px;
  overflow-y: auto;
}

.ns-search-item {
  display: block;
  padding: 12px 20px;
  color: var(--ns-text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--ns-border);
  transition: background 0.2s;
}

.ns-search-item:last-child {
  border-bottom: none;
}

.ns-search-item:hover {
  background: var(--ns-bg);
  color: var(--ns-red);
}

/* STREAMING_CHUNK:Designing the dictionary word cards... /
/ =========================================
WORD CARDS GRID & LAYOUT
========================================= */
.ns-word-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.ns-card {
  background: #fff;
  border: 2px solid var(--ns-border);
  border-radius: 12px;
  padding: 25px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.ns-card:hover {
  border-color: var(--ns-black);
  box-shadow: 8px 8px 0 var(--ns-yellow);
  transform: translateY(-4px);
}

.ns-card-title {
  margin: 0 0 10px 0;
  font-size: 1.6rem;
  font-weight: 900;
  text-transform: capitalize;
}

.ns-card-title a {
  color: var(--ns-black);
  text-decoration: none;
}

.ns-card-title a:hover {
  color: var(--ns-red);
}

.ns-definition {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-top: 15px;
  color: var(--ns-text);
  flex-grow: 1;
}

.ns-usage {
  margin-top: 15px;
  padding: 15px;
  background: var(--ns-bg);
  border-left: 4px solid var(--ns-yellow);
  font-style: italic;
  color: var(--ns-text-light);
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

/* STREAMING_CHUNK:Setting up category tags and colors... /
/ =========================================
CATEGORY TAGS
========================================= */
.ns-category-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 5px;
  margin-bottom: 10px;
  align-self: flex-start;
}

.ns-cat-color-0 {
  background: #e3f2fd;
  color: #1976d2;
}
.ns-cat-color-1 {
  background: #e8f5e9;
  color: #2e7d32;
}
.ns-cat-color-2 {
  background: #f3e5f5;
  color: #7b1fa2;
}
.ns-cat-color-3 {
  background: #fff3e0;
  color: #ef6c00;
}
.ns-cat-color-4 {
  background: #ffebee;
  color: #c62828;
}
.ns-cat-color-5 {
  background: #e0f7fa;
  color: #00838f;
}

/* STREAMING_CHUNK:Styling the voting and action buttons... /
/ =========================================
ACTIONS (VOTING & SHARE)
========================================= */
.ns-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--ns-border);
}

.ns-vote-box {
  display: flex;
  align-items: center;
  background: var(--ns-bg);
  border-radius: 50px;
  padding: 5px;
  border: 1px solid var(--ns-border);
}

.ns-vote-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--ns-text-light);
  padding: 5px 10px;
  transition: all 0.2s;
  outline: none;
}

.ns-vote-btn:hover:not(:disabled) {
  color: var(--ns-black);
  transform: scale(1.2);
}

.ns-vote-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.ns-score {
  font-weight: 800;
  font-size: 1.1rem;
  min-width: 30px;
  text-align: center;
  color: var(--ns-black);
}

.ns-share-btn {
  background: none;
  border: 2px solid var(--ns-border);
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ns-text);
}

.ns-share-btn:hover {
  border-color: var(--ns-black);
  background: var(--ns-black);
  color: #fff;
}

/* STREAMING_CHUNK:Configuring the share modal popup... /
/ =========================================
SHARE MODAL
========================================= */
.ns-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.ns-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ns-modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  position: relative;
  transform: translateY(20px);
  transition: all 0.3s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.ns-modal-overlay.active .ns-modal-content {
  transform: translateY(0);
}

.ns-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  text-align: center;
}

.ns-close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ns-text-light);
}

.ns-share-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ns-share-opt {
  display: block;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  color: #fff;
}

.ns-share-opt.whatsapp {
  background: #25d366;
}
.ns-share-opt.facebook {
  background: #1877f2;
}
.ns-share-opt.twitter {
  background: #000000;
}
.ns-share-opt.copy-link {
  background: var(--ns-bg);
  color: var(--ns-black);
  border: 2px solid var(--ns-border);
}

.ns-share-opt:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* STREAMING_CHUNK:Building the notification toaster... /
/ =========================================
TOASTER (NOTIFICATIONS)
========================================= */
.ns-toaster {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ns-success);
  color: #fff;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3);
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ns-toaster.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.ns-toaster.error {
  background: var(--ns-error);
  box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

/* STREAMING_CHUNK:Adding the complete Quiz UI styling... /
/ =========================================
UJIAN LOGHAT (QUIZ) STYLES
========================================= */
.ns-quiz-wrapper {
  max-width: 600px;
  margin: 40px auto;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

.ns-quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ns-black);
  color: var(--ns-yellow);
  padding: 15px 25px;
  border-radius: 12px 12px 0 0;
  border: 3px solid var(--ns-black);
}

.ns-quiz-header h2 {
  font-size: 1.2rem;
  letter-spacing: 1px;
  margin: 0;
}

.ns-quiz-score {
  font-weight: 900;
  font-size: 1.2rem;
  text-transform: uppercase;
  background: #333;
  padding: 5px 15px;
  border-radius: 20px;
}

.ns-quiz-card {
  background: white;
  border: 3px solid var(--ns-black);
  border-top: none;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 12px 12px 0 #ddd;
  border-radius: 0 0 12px 12px;
  position: relative;
  margin-bottom: 20px;
}

.ns-quiz-question-label {
  font-size: 0.9rem;
  color: var(--ns-text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  font-weight: bold;
}

.ns-quiz-question-word {
  font-size: 3rem;
  font-weight: 900;
  color: var(--ns-red);
  margin: 0 0 40px 0;
  text-transform: uppercase;
  line-height: 1.1;
  text-shadow: 2px 2px 0 #000;
}

.ns-quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

@media (min-width: 600px) {
  .ns-quiz-options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ns-quiz-option-btn {
  background: #fff;
  border: 2px solid var(--ns-border);
  padding: 20px;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: bold;
  color: var(--ns-text);
  width: 100%;
  line-height: 1.3;
  text-align: center;
}

.ns-quiz-option-btn:hover {
  border-color: var(--ns-black);
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  background: #fffbe6;
  z-index: 2;
}

.ns-quiz-option-btn.correct {
  background: var(--ns-success) !important;
  color: white !important;
  border-color: #27ae60 !important;
  pointer-events: none;
}

.ns-quiz-option-btn.wrong {
  background: var(--ns-error) !important;
  color: white !important;
  border-color: #c0392b !important;
  opacity: 0.5;
  pointer-events: none;
}

#nsQuizNext {
  margin-top: 25px;
  animation: fadeIn 0.5s ease;
}

.ns-btn-next {
  background: var(--ns-yellow);
  color: var(--ns-black);
  border: 3px solid var(--ns-black);
  padding: 15px 50px;
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--ns-black);
  border-radius: 50px;
  transition: all 0.2s;
  display: inline-block;
}

.ns-btn-next:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 var(--ns-black);
  background: #ffe04d;
}

.ns-quiz-feedback {
  margin-top: 25px;
  font-weight: bold;
  font-size: 1.2rem;
  min-height: 30px;
}

.ns-quiz-loading {
  font-size: 1.2rem;
  font-weight: bold;
  color: #888;
  padding: 60px 0;
  animation: pulse 1.5s infinite;
}

/* STREAMING_CHUNK:Finalizing mobile responsiveness and animations... /
/ =========================================
ANIMATIONS & RESPONSIVE
========================================= */
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .ns-word-grid {
    grid-template-columns: 1fr;
  }

  .ns-quiz-question-word {
    font-size: 2.2rem;
  }
}
