* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: #f6f6f6;
  color: #333;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: #1a1a2e;
  color: #e0e0e0;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid #e0e0e0;
  transition: background 0.3s, border-color 0.3s;
}

body.dark .toolbar {
  background: #16213e;
  border-bottom-color: #2a2a4a;
}

.toggle-group {
  display: flex;
  background: #e0e0e0;
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
  transition: background 0.3s;
}

body.dark .toggle-group {
  background: #2a2a4a;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: #666;
  width: 44px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark .toggle-btn {
  color: #888;
}

.toggle-btn:hover {
  background: rgba(0,0,0,0.05);
}

body.dark .toggle-btn:hover {
  background: rgba(255,255,255,0.1);
}

.toggle-btn.active {
  background: #3b82f6;
  color: #fff;
}

.toggle-btn svg {
  width: 20px;
  height: 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1800px;
  margin: 0 auto;
  padding: 30px 20px;
}

@media (min-width: 1400px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.3s, box-shadow 0.3s;
}

body.dark .card {
  background: #16213e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.card-error {
  border: 2px solid #e74c3c;
}

.card-error .hdr {
  background: #fdf2f2;
}

body.dark .card-error .hdr {
  background: #3d1f1f;
}

.card-error .status {
  color: #e74c3c;
  font-size: 0.85rem;
  font-weight: 500;
}

.hdr {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #fafafa;
  border-bottom: 1px solid #eee;
  transition: background 0.3s, border-color 0.3s;
}

body.dark .hdr {
  background: #1a1a2e;
  border-bottom-color: #2a2a4a;
}

.hdr h3 {
  flex: 1;
  font-size: 1.1rem;
  color: #333;
  transition: color 0.3s;
}

body.dark .hdr h3 {
  color: #e0e0e0;
}

.hdr h3 a {
  color: inherit;
  text-decoration: none;
}

.hdr h3 a:hover {
  color: #3b82f6;
  text-decoration: underline;
}

.hdr > a {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
}

.iframe-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #e8e8e8;
  padding: 10px;
  min-height: 470px;
  transition: background 0.3s;
}

body.dark .iframe-wrap {
  background: #0f0f1a;
}

.iframe-wrap iframe {
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.iframe-wrap.desktop iframe {
  width: 100%;
  height: 450px;
}

.iframe-wrap.mobile iframe {
  width: 375px;
  height: 667px;
  border-radius: 20px;
}

.error-msg {
  color: #666;
  text-align: center;
  padding: 40px;
  font-size: 0.95rem;
}

body.dark .error-msg {
  color: #888;
}

.ft {
  text-align: center;
  padding: 30px;
  color: #666;
  transition: color 0.3s;
}

body.dark .ft {
  color: #888;
}

.ft a {
  color: #3b82f6;
  text-decoration: none;
}
