/* ============================================================
   Strange Games Tools — Shared Styles
   ============================================================ */

/* ── Reset & Base ── */
.sg-tool *, .sg-tool *::before, .sg-tool *::after { box-sizing: border-box; margin: 0; padding: 0; }

.sg-tool {
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
  background: #0d0d0f;
  color: #e0e0e0;
  border-radius: 16px;
  overflow: hidden;
  padding: 0 0 24px;
  max-width: 860px;
  margin: 0 auto 32px;
  border: 1px solid #1e1e2e;
}

/* ── Header ── */
.sg-tool-header {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  padding: 28px 24px 20px;
  border-bottom: 1px solid #1e1e2e;
  text-align: center;
}
.sg-tool-icon { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.sg-tool-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}
.sg-tool-header p { font-size: 0.9rem; color: #888; }

/* ── Card ── */
.sg-card {
  background: #13131f;
  border: 1px solid #1e1e2e;
  border-radius: 12px;
  padding: 20px;
  margin: 16px 16px 0;
}

/* ── Form Elements ── */
.sg-label { display: block; font-size: 0.8rem; color: #888; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.sg-label:first-child { margin-top: 0; }

.sg-input, .sg-select {
  width: 100%;
  background: #0d0d0f;
  border: 1px solid #2e2e40;
  color: #e0e0e0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
}
.sg-input:focus, .sg-select:focus { border-color: #00ff88; }
.sg-select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ── Dropdown List ── */
.sg-dropdown-list {
  background: #1a1a2e;
  border: 1px solid #2e2e40;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 220px;
  overflow-y: auto;
  position: relative;
  z-index: 10;
  margin-top: -1px;
}
.sg-drop-item { padding: 10px 14px; cursor: pointer; font-size: 0.9rem; transition: background 0.15s; }
.sg-drop-item:hover { background: #252540; color: #00ff88; }

/* ── Buttons ── */
.sg-btn {
  display: inline-block;
  background: linear-gradient(90deg, #00ff88 0%, #00c8ff 100%);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 16px;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
}
.sg-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.sg-btn:active { transform: scale(0.98); }

.sg-btn-sm { padding: 8px 16px; font-size: 0.85rem; margin-top: 10px; margin-right: 6px; }
.sg-btn-outline {
  background: transparent;
  color: #00ff88;
  border: 1px solid #00ff88;
}
.sg-btn-outline:hover { background: rgba(0,255,136,0.08); }
.sg-btn-active { background: linear-gradient(90deg, #00ff88 0%, #00c8ff 100%) !important; color: #000 !important; }

/* ── Result Cards ── */
.sg-result-card {
  margin: 16px 16px 0;
  border-radius: 12px;
  padding: 24px;
  border: 2px solid transparent;
  text-align: center;
  animation: sgSlideIn 0.4s ease;
}
.sg-green { background: #0a1f15; border-color: #00ff88; }
.sg-yellow { background: #1f1a00; border-color: #ffcc00; }
.sg-red { background: #1f0a0a; border-color: #ff4444; }

.sg-result-icon { font-size: 3rem; margin-bottom: 10px; }
.sg-result-verdict { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.sg-green .sg-result-verdict { color: #00ff88; }
.sg-yellow .sg-result-verdict { color: #ffcc00; }
.sg-red .sg-result-verdict { color: #ff4444; }

.sg-result-game { font-size: 1rem; color: #888; margin-bottom: 12px; }
.sg-result-why { font-size: 0.9rem; margin-bottom: 12px; line-height: 1.5; }
.sg-result-tips { list-style: none; text-align: left; font-size: 0.875rem; line-height: 1.6; }
.sg-result-tips li::before { content: "→ "; color: #00ff88; }
.sg-result-tips li { margin-bottom: 4px; }

/* ── Score Widget ── */
.sg-score-card h3.sg-score-title { font-size: 1.3rem; margin-bottom: 20px; color: #fff; }
.sg-rings-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 16px; }
.sg-ring-wrap { text-align: center; }
.sg-ring-svg { width: 90px; height: 90px; }
.sg-ring-arc { transition: stroke-dasharray 0.8s ease; }
.sg-ring-label { font-size: 0.72rem; color: #888; margin-top: 4px; max-width: 90px; }
.sg-oc-badge { display: inline-block; padding: 6px 16px; border-radius: 20px; color: #000; font-weight: 700; font-size: 0.85rem; margin-top: 8px; }
.sg-not-found { text-align: center; color: #888; font-size: 0.95rem; }
.sg-widget-footer { text-align: center; font-size: 0.75rem; color: #444; margin-top: 20px; }

/* ── Quiz & Recommender ── */
.sg-quiz-progress-bar { height: 4px; background: #1e1e2e; margin: 16px 16px 0; border-radius: 2px; }
.sg-quiz-progress-bar div { height: 100%; background: linear-gradient(90deg, #00ff88, #00c8ff); border-radius: 2px; transition: width 0.4s; }

.sg-quiz-num { font-size: 0.75rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.sg-quiz-question h3, .sg-card h3 { font-size: 1.05rem; font-weight: 600; color: #fff; margin-bottom: 16px; line-height: 1.4; }

.sg-quiz-opts, .sg-rec-opts { display: flex; flex-direction: column; gap: 8px; }
.sg-quiz-opt, .sg-rec-opt {
  background: #0d0d0f;
  border: 1px solid #2e2e40;
  color: #e0e0e0;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.2s, background 0.2s;
}
.sg-quiz-opt:hover, .sg-rec-opt:hover { border-color: #00ff88; background: #0a1a10; color: #00ff88; }

.sg-quiz-result { text-align: center; }
.sg-quiz-type { font-size: 1.5rem; font-weight: 800; margin: 10px 0; }
.sg-quiz-result p { font-size: 0.9rem; line-height: 1.6; margin-bottom: 14px; color: #ccc; }
.sg-result-games { margin-bottom: 14px; font-size: 0.875rem; }

/* ── Tags ── */
.sg-tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sg-tag { background: #1e1e2e; color: #aaa; font-size: 0.75rem; padding: 3px 10px; border-radius: 20px; }
.sg-diff { background: #2a1500; color: #ff9900; }
.sg-plat-android { background: #0a2010; color: #00ff88; }
.sg-plat-pc { background: #00102a; color: #4dd0ff; }
.sg-plat-console { background: #1a0030; color: #c084fc; }
.sg-plat-ppsspp { background: #2a1500; color: #ff9900; }
.sg-plat-mobile { background: #0a2010; color: #00ff88; }

/* ── Recommendation Engine ── */
.sg-rec-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.sg-rec-results { padding: 0 16px; }
.sg-rec-card { margin: 12px 0; }
.sg-rec-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: #fff; }
.sg-rec-card p { font-size: 0.875rem; color: #aaa; line-height: 1.5; margin: 8px 0; }
.sg-rec-rank { font-size: 0.8rem; color: #00ff88; font-weight: 700; margin-bottom: 6px; }
.sg-match-bar { height: 6px; background: #1e1e2e; border-radius: 3px; margin: 10px 0 6px; position: relative; }
.sg-match-bar div { height: 100%; background: linear-gradient(90deg, #00ff88, #00c8ff); border-radius: 3px; }
.sg-match-bar span { font-size: 0.75rem; color: #888; display: block; margin-top: 4px; }
.sg-empty { color: #555; text-align: center; padding: 30px; font-size: 0.9rem; }

/* ── Nickname Generator ── */
.sg-style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 14px; }
.sg-style-btn {
  background: #0d0d0f;
  border: 1px solid #2e2e40;
  color: #aaa;
  padding: 10px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}
.sg-style-btn.active, .sg-style-btn:hover { border-color: #00ff88; color: #00ff88; }

.sg-nick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  padding: 16px;
}
.sg-nick-card {
  background: #13131f;
  border: 1px solid #2e2e40;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.sg-nick-card:hover { border-color: #00ff88; box-shadow: 0 0 14px rgba(0,255,136,0.12); }
.sg-nick-name { font-size: 1.1rem; font-weight: 700; color: #00ff88; margin-bottom: 4px; word-break: break-all; }
.sg-nick-vibe { font-size: 0.78rem; color: #666; margin-bottom: 8px; line-height: 1.3; }
.sg-nick-copy { font-size: 0.75rem; color: #444; transition: color 0.2s; }
.sg-nick-card:hover .sg-nick-copy { color: #00ff88; }

/* ── Countdown Tracker ── */
.sg-filter-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 16px 16px 0; }
.sg-filter {
  background: #13131f;
  border: 1px solid #2e2e40;
  color: #888;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.sg-filter.active, .sg-filter:hover { border-color: #00ff88; color: #00ff88; background: #0a1a10; }

.sg-cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 16px 16px 0; }
.sg-section-title { padding: 20px 16px 0; font-size: 1rem; color: #888; }

.sg-cd-card { position: relative; transition: box-shadow 0.2s; }
.sg-cd-card:hover { box-shadow: 0 0 16px rgba(0,255,136,0.08); }
.sg-cd-emoji { font-size: 1.8rem; margin-bottom: 8px; }
.sg-cd-title { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.sg-cd-date { font-size: 0.8rem; color: #888; margin: 8px 0; }
.sg-cd-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sg-cd-actions .sg-btn-sm { margin-top: 0; }

.sg-timer { display: flex; align-items: baseline; gap: 4px; font-size: 0.85rem; margin: 8px 0; }
.sg-digit { background: #0d0d0f; border: 1px solid #2e2e40; border-radius: 4px; padding: 4px 6px; font-family: 'Courier New', monospace; font-size: 1.1rem; font-weight: 700; color: #00ff88; min-width: 32px; text-align: center; }
.sg-timer em { color: #555; font-style: normal; margin-right: 4px; font-size: 0.75rem; }

.sg-urgent { border-color: #ff9900 !important; animation: sgPulse 1.5s ease-in-out infinite; }
.sg-released .sg-cd-title { color: #888; }
.sg-out-now { background: #00ff88; color: #000; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }

/* ── Glossary ── */
.sg-totd-card { margin: 16px; }
.sg-totd-label { font-size: 0.75rem; text-transform: uppercase; color: #ffcc00; letter-spacing: 0.5px; margin-bottom: 6px; }
.sg-totd-card strong { font-size: 1.1rem; color: #fff; }
.sg-totd-card p { font-size: 0.875rem; color: #aaa; margin-top: 6px; line-height: 1.5; }

.sg-cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.sg-cat-tab {
  background: #13131f;
  border: 1px solid #2e2e40;
  color: #888;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.sg-cat-tab.active, .sg-cat-tab:hover { border-color: #4dd0ff; color: #4dd0ff; background: #001020; }

.sg-az-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 16px 0; }
.sg-az-btn {
  background: #0d0d0f;
  border: 1px solid #2e2e40;
  color: #666;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.15s;
}
.sg-az-btn:hover { border-color: #00ff88; color: #00ff88; }

.sg-letter-section { margin: 0 16px; }
.sg-letter-header { font-size: 1.4rem; font-weight: 800; color: #2e2e40; padding: 20px 0 8px; border-bottom: 1px solid #1e1e2e; margin-bottom: 8px; }

.sg-term-card { margin-bottom: 10px; position: relative; }
.sg-term-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.sg-term-name { font-size: 1rem; font-weight: 700; color: #00ff88; }
.sg-cat-badge { background: #1a1a2e; color: #4dd0ff; font-size: 0.7rem; padding: 2px 10px; border-radius: 10px; }
.sg-term-def { font-size: 0.875rem; color: #ccc; line-height: 1.5; margin-bottom: 4px; }
.sg-term-example { font-size: 0.82rem; color: #666; line-height: 1.4; margin-bottom: 8px; }
.sg-related { font-size: 0.78rem; color: #555; }
.sg-rel-tag { background: #1e1e2e; color: #4dd0ff; padding: 2px 8px; border-radius: 10px; margin: 2px 4px 2px 0; cursor: pointer; display: inline-block; }
.sg-rel-tag:hover { background: #001020; color: #00ff88; }
.sg-share-term { position: absolute; top: 14px; right: 14px; background: none; border: none; cursor: pointer; font-size: 1rem; opacity: 0.3; transition: opacity 0.2s; }
.sg-share-term:hover { opacity: 1; }

/* ── Animations ── */
@keyframes sgSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes sgPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,153,0,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(255,153,0,0); }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .sg-tool-header { padding: 20px 16px; }
  .sg-tool-header h2 { font-size: 1.2rem; }
  .sg-rings-row { gap: 10px; }
  .sg-ring-svg { width: 72px; height: 72px; }
  .sg-style-grid { grid-template-columns: 1fr 1fr; }
  .sg-cd-grid { grid-template-columns: 1fr; }
  .sg-nick-grid { grid-template-columns: 1fr; }
  .sg-rec-opts { grid-template-columns: 1fr 1fr; }
  .sg-timer { flex-wrap: wrap; }
  .sg-az-btn { width: 24px; height: 24px; font-size: 0.68rem; }
}
