/* ==========================================================================
   WORD UNSCRAMBLER - MATCHING SOLVER.CSS STYLE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

.wwu {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1010px;
  margin: 30px auto;
  padding: 40px 20px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
  font-family: "Rubik", sans-serif;
  color: #2b2d32;
}

.wwu-form, .wwu-results { width: 100%; }

.ws-title {
    font-size: 32px;
    font-weight: 700;
    color: #252a34;
    margin-bottom: 6px;
    line-height: 1.2;
    text-align: center;
}

.wwu-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 20px;
}

.wwu-row input {
  flex: 1;
  background: #f5f5f4;
  border: 2px solid #e5e7ec;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 600;
  color: #252a34;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.15s ease-in-out;
}

.wwu-row input:focus {
  border-color: #65bc2e;
  background: #ffffff;
}

.wwu-row input::placeholder {
  letter-spacing: normal;
  color: #adb3c2;
  font-weight: 500;
}

.wwu-row button {
  background: #63af4e;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  min-width: 160px;
}

.wwu-row button:hover { background: #7cd148; }
.wwu-row button:disabled { background: #a3cca3; cursor: not-allowed; }

.wwu-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #fbfbfc;
  border: 1px solid #edf0f5;
  padding: 24px;
  border-radius: 16px;
  margin-top: 16px;
}

.wwu-options label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 600;
  color: #697282;
  gap: 6px;
}

.wwu-options input, 
.wwu-options select {
  width: 100%;
  border: 2px solid #e5e7ec;
  border-radius: 10px;
  padding: 11px 14px;
  background: #ffffff;
  color: #252a34;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.15s ease-in-out;
}

.wwu-options input:focus, 
.wwu-options select:focus {
  border-color: #65bc2e;
  box-shadow: 0 0 0 3px rgba(101, 188, 46, 0.1);
}

@media (max-width: 800px) {
  .wwu-options {
    grid-template-columns: repeat(2, 1fr); 
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .wwu-options {
    grid-template-columns: 1fr; 
    gap: 12px;
    padding: 14px;
  }
}

.wwu-status {
  min-height: 22px;
  margin: 24px 0 16px;
  color: #858fa0;
  font-size: 14.5px;
  text-align: center;
}
.wwu-status strong { color: #252a34; }

.wwu-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.wwu-section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 16px; }
.wwu-section-heading h2 { margin: 0; font-size: 18px; line-height: 1.25; color: #252a34; }
.wwu-section-heading p { margin: 4px 0 0; color: #858fa0; font-size: 13.5px; }
.wwu-section-count { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 9px; border-radius: 999px; background: #f0f7ed; color: #4e9838; font-size: 12px; font-weight: 700; }

.wwu-word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.wwu-word-tile { width: 100%; border: 1px solid #e5e7ec; border-radius: 10px; background: #f5f5f4; padding: 12px 10px 10px; text-align: center; cursor: pointer; font: inherit; color: #252a34; transition: .15s; }
.wwu-word-tile:hover { background: #e6f3e6; border-color: #65bc2e; transform: translateY(-1px); }
.wwu-word-tile[aria-expanded="true"] { border-color: #63af4e; background: #eef8eb; box-shadow: 0 0 0 2px rgba(99,175,78,.1); }
.wwu-tile-word { display: block; font-size: 18px; font-weight: 700; line-height: 1.2; text-transform: uppercase; }
.wwu-tile-footer { display: block; margin-top: 7px; color: #858fa0; font-size: 12px; }

.wwu-featured { border-top: 0; padding-top: 0; }
.wwu-featured .wwu-word-tile { background: #fff; }
.wwu-featured .wwu-tile-word { font-size: 17px; }

.wwu-dictionary-panel { width: 100%; margin-top: 14px; padding: 24px; background: #f5f5f4; border: 2px dashed #c8d0dc; border-radius: 16px; animation: wwuFade .2s ease; scroll-margin-top: 20px; }
.wwu-dictionary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wwu-dictionary-label { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #858fa0; font-weight: 700; }
.wwu-dictionary-head h3 { margin: 3px 0 0; font-size: 24px; color: #252a34; text-transform: capitalize; }
.wwu-dict-close { border: 0; background: transparent; color: #858fa0; font-size: 24px; cursor: pointer; }
.wwu-dictionary-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.wwu-dictionary-meta span { font-size: 12px; color: #66705f; background: #fff; border: 1px solid #e2e8de; border-radius: 999px; padding: 5px 9px; }

.wwu-pronunciation { font-size: 15px; color: #4c9238; margin: 8px 0 12px; }
.wwu-frequency { font-size: 12px; color: #858fa0; margin-bottom: 12px; }
.wwu-meaning { padding: 12px 0; border-top: 1px solid #e5e7ec; }
.wwu-meaning:first-of-type { border-top: 0; }
.wwu-pos-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #63af4e; color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .35px; margin-bottom: 10px; }
.wwu-definition { display: grid; grid-template-columns: 24px 1fr; gap: 6px; font-size: 14.5px; line-height: 1.55; color: #2b2d32; }
.wwu-definition p { margin: 0; }

.wwu-dict-loading, .wwu-dict-muted, .wwu-dict-error { font-size: 14px; color: #858fa0; padding: 8px 0; }
.wwu-dict-link { display: inline-block; margin-top: 8px; color: #4e9838; text-decoration: none; font-size: 13px; font-weight: 600; }
.wwu-dict-link:hover { text-decoration: underline; }
.wwu-empty { padding: 28px 10px; text-align: center; color: #858fa0; font-size: 14.5px; }
.wwu-loading-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #63af4e; margin-right: 7px; animation: wwuPulse 1s infinite; }

@keyframes wwuFade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wwuPulse { 50% { opacity: .35; } }

@media (max-width: 600px) {
  .wwu { padding: 24px 16px; border-radius: 18px; margin: 20px auto; }
  .wwu-row { flex-direction: column; }
  .wwu-row input, .wwu-row button { width: 100%; min-height: 52px; }
  .wwu-options { grid-template-columns: repeat(2, 1fr); padding: 16px; }
  .wwu-word-grid { grid-template-columns: repeat(2, 1fr); }
  .wwu-dictionary-panel { padding: 16px; }
}

/* letters (> 8 huruf) */
.wwu-word-tile.is-long {
  grid-column: span 2; 
}

.wwu-word-tile.is-long .wwu-tile-word {
  font-size: 15px; 
  letter-spacing: 0.5px;
}

/* Mobile Screen */
@media (max-width: 600px) {
  .wwu-word-tile.is-long {
    grid-column: span 1;
  }
  .wwu-word-tile.is-long .wwu-tile-word {
    font-size: 14px;
  }
}