.themeworld-root {
  background-color: #000033;
  background-image: radial-gradient(#333399 1px, transparent 1.5px);
  background-size: 16px 16px;
  color: #000000;
  font-family: var(--win-font, 'MS Sans Serif', Tahoma, sans-serif);
  font-size: 11px;
  min-height: 100%;
  box-sizing: border-box;
  padding: 10px;
}

.themeworld-wrapper {
  max-width: 860px;
  margin: 0 auto;
  background: #c0c0c0;
  border: 2px outset #ffffff;
  padding: 6px;
}

.themeworld-header {
  background: #000080;
  border: 2px inset #808080;
  color: #ffffff;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.themeworld-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.themeworld-logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.themeworld-logo-icon {
  line-height: 0;
}

.themeworld-title-main .web-gif {
  vertical-align: -2px;
}

.themeworld-btn .web-gif,
.themeworld-btn-primary .web-gif {
  vertical-align: -4px;
}

.themeworld-title-main {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #ffff00;
  text-shadow: 2px 2px 0 #000000, -1px -1px 0 #804000;
  font-family: 'Times New Roman', serif, 'MS Sans Serif';
}

.themeworld-title-sub {
  font-size: 11px;
  color: #a8d5ff;
  font-style: italic;
}

.themeworld-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}

.themeworld-badge {
  background: #000;
  border: 1px outset #fff;
  padding: 2px 6px;
  font-size: 9px;
  color: #00ff00;
  font-family: monospace;
  font-weight: bold;
  text-align: center;
}

.themeworld-badge span {
  color: #ff3b30;
}

.themeworld-marquee-bar {
  background: #000000;
  border: 1px inset #808080;
  color: #00ff66;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 6px;
}

.themeworld-nav-tabs {
  display: flex;
  gap: 2px;
  margin-top: 6px;
  border-bottom: 2px solid #808080;
  padding-left: 4px;
}

.themeworld-tab-btn {
  background: #d4d0c8;
  border: 2px outset #ffffff;
  border-bottom: none;
  padding: 5px 12px;
  font-family: var(--win-font, sans-serif);
  font-size: 11px;
  font-weight: normal;
  cursor: pointer;
  outline: none;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: -2px;
}

.themeworld-tab-btn:hover {
  background: #e8e6e0;
}

.themeworld-tab-btn.active {
  background: #c0c0c0;
  font-weight: bold;
  border-bottom: 2px solid #c0c0c0;
  padding-top: 6px;
  z-index: 2;
}

.themeworld-body {
  background: #c0c0c0;
  padding: 10px 6px;
  min-height: 380px;
}

.themeworld-filter-bar {
  background: #e0e0e0;
  border: 1px inset #808080;
  padding: 6px 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.themeworld-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.themeworld-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.themeworld-card {
  background: #dcdcdc;
  border: 2px outset #ffffff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.themeworld-card-header {
  font-weight: bold;
  font-size: 12px;
  color: #000080;
  border-bottom: 1px dotted #808080;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.themeworld-card-badge {
  font-size: 9px;
  background: #ffcc00;
  color: #000;
  padding: 1px 4px;
  border: 1px solid #997700;
  font-weight: bold;
  text-transform: uppercase;
}

.themeworld-preview-box {
  width: 100%;
  height: 120px;
  border: 2px inset #808080;
  background: #000000;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.themeworld-preview-overlay {
  position: absolute;
  bottom: 2px;
  right: 4px;
  background: #000000;
  color: #00ff00;
  font-family: monospace;
  font-size: 9px;
  padding: 1px 4px;
  border: 1px solid #444;
}

.themeworld-card-desc {
  font-size: 11px;
  color: #222222;
  line-height: 1.35;
  min-height: 38px;
}

.themeworld-card-meta {
  font-size: 10px;
  color: #555555;
  background: #ececec;
  border: 1px inset #bbb;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
}

.themeworld-card-actions {
  display: flex;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}

.themeworld-btn {
  flex: 1;
  padding: 3px 6px;
  font-size: 11px;
  font-family: var(--win-font, sans-serif);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.themeworld-btn-primary {
  font-weight: bold;
  color: #000080;
}

.themeworld-theme-swatch {
  width: 100%;
  height: 90px;
  border: 2px inset #808080;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.themeworld-swatch-titlebar {
  height: 18px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  font-family: var(--win-font, sans-serif);
}

.themeworld-swatch-client {
  flex: 1;
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.themeworld-gb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.themeworld-gb-entry {
  background: #ffffff;
  border: 1px inset #808080;
  padding: 8px;
}

.themeworld-gb-header {
  font-weight: bold;
  color: #000080;
  border-bottom: 1px dotted #ccc;
  padding-bottom: 4px;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.themeworld-gb-text {
  font-size: 11px;
  color: #111;
  line-height: 1.4;
}

.themeworld-footer {
  border-top: 2px inset #808080;
  margin-top: 10px;
  padding: 10px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  color: #444444;
}

.themeworld-counter-box {
  background: #000000;
  border: 2px inset #808080;
  color: #00ff00;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 2px;
  padding: 2px 8px;
}

.themeworld-modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.themeworld-modal-win {
  background: #c0c0c0;
  border: 2px outset #ffffff;
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.themeworld-modal-picture {
  height: 300px;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  margin: 0 auto;
  border: 2px inset #808080;
  position: relative;
  overflow: hidden;
}

.themeworld-modal-titlebar {
  background: var(--win-active-title, linear-gradient(90deg, #000080, #1084d0));
  color: #ffffff;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.themeworld-modal-close {
  background: #c0c0c0;
  border: 1px outset #fff;
  width: 16px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
}
