* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: #000;
  color: #fff;
  overflow: hidden;
  height: 100vh;
  font-weight: 300;
}

.container {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  grid-template-rows: 60px 1fr;
  height: 100vh;
  gap: 1px;
  background: #222;
}

.header {
  grid-column: 1 / -1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #333;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header h1 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 4px;
  color: #fff;
}

.header-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.header-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #888;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #333;
  border-radius: 4px;
  transition: all 0.2s;
}

.header-link:hover {
  color: #fff;
  border-color: #666;
  background: #111;
}

.header-link svg {
  width: 14px;
  height: 14px;
}

.header .status {
  display: flex;
  gap: 20px;
  font-size: 10px;
  color: #666;
  font-weight: 400;
}

.panel {
  background: #0a0a0a;
  padding: 16px;
  overflow-y: auto;
}

.panel-center {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.panel-content::-webkit-scrollbar {
  width: 4px;
}

.panel-content::-webkit-scrollbar-track {
  background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

.panel::-webkit-scrollbar {
  width: 4px;
}

.panel::-webkit-scrollbar-track {
  background: transparent;
}

.panel::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 2px;
}

.panel-title {
  font-size: 9px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #1a1a1a;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.feature-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 10px;
  border-left: 2px solid transparent;
  padding-left: 8px;
  transition: all 0.2s;
  color: #888;
  text-transform: capitalize;
}

.feature-item:hover {
  border-left-color: #fff;
  padding-left: 12px;
  color: #fff;
}

.feature-item.supported {
  color: #aaa;
}

.feature-item.not-supported {
  color: #444;
}

.feature-status {
  font-size: 9px;
  color: #666;
}

.feature-status.yes {
  color: #fff;
}

.feature-status.no {
  color: #333;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.test-card {
  background: #000;
  padding: 12px;
  border: 1px solid #1a1a1a;
  transition: all 0.2s;
}

.test-card:hover {
  border-color: #333;
  background: #0a0a0a;
}

.test-card h3 {
  font-size: 11px;
  font-weight: 400;
  margin-bottom: 8px;
  color: #888;
}

.test-card button {
  background: #000;
  color: #fff;
  border: 1px solid #333;
  padding: 8px;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-weight: 400;
}

.test-card button:hover:not(:disabled) {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.test-card button:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.test-card input {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  background: #000;
  border: 1px solid #1a1a1a;
  color: #fff;
  font-family: inherit;
  font-size: 10px;
}

.test-card input:focus {
  outline: none;
  border-color: #333;
}

.test-card input::placeholder {
  color: #444;
}

.result {
  margin-top: 8px;
  padding: 8px;
  background: #000;
  border-left: 2px solid #333;
  font-size: 9px;
  max-height: 50px;
  overflow-y: auto;
  color: pink;
  font-family: "Courier New", monospace;
}

.console {
  background: #000;
  padding: 16px;
  overflow-y: auto;
  font-size: 10px;
  line-height: 1.6;
  border-top: 1px solid #1a1a1a;
  font-family: "Courier New", monospace;
  margin-top: 16px;
  border-radius: 2px;
  height: 200px;
  transition: height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.console.hidden {
  height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  margin-top: 0;
  border: none;
}

.console-line {
  color: #666;
  margin-bottom: 2px;
}

.console-line.success {
  color: #fff;
}

.console-line.error {
  color: #888;
}

.console-line.info {
  color: #444;
}

.action-button {
  background: #000;
  padding: 10px;
  font-family: inherit;
  cursor: pointer;
  font-size: 10px;
  width: 100%;
  margin-bottom: 8px;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
}

.action-button.primary {
  border: 1px solid #fff;
  color: #fff;
}

.action-button.primary:hover {
  background: #fff;
  color: #000;
}

.action-button.secondary {
  border: 1px solid #444;
  color: #666;
}

.action-button.secondary:hover {
  border-color: #888;
  color: #fff;
}

.action-button.danger {
  border: 1px solid #333;
  color: #444;
}

.action-button.danger:hover {
  border-color: #666;
  color: #888;
}

.stats-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #1a1a1a;
  font-size: 9px;
  line-height: 1.8;
  color: #666;
}

.stats-title {
  font-size: 9px;
  margin-bottom: 8px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stats-panel div span {
  color: #fff;
}

.shortcuts-panel {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #1a1a1a;
  font-size: 9px;
  line-height: 1.8;
  color: #666;
}

.shortcuts-title {
  font-size: 9px;
  margin-bottom: 8px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.shortcuts-content code {
  color: #aaa;
  background: #000;
  padding: 2px 4px;
}

.actions-container {
  display: flex;
  flex-direction: column;
}

.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.015;
  pointer-events: none;
  z-index: 0;
}

.blink {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: #333;
}

@media (max-width: 1024px) {
  .container {
    grid-template-columns: 1fr;
    grid-template-rows: 60px auto auto 1fr auto;
  }

  .panel:first-of-type {
    grid-row: 2;
  }

  .panel-center {
    grid-row: 3;
    min-height: 400px;
  }

  .panel:last-of-type {
    grid-row: 4;
  }

  .header-left {
    gap: 16px;
  }

  .header h1 {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .header-links {
    gap: 8px;
  }

  .header-link {
    font-size: 10px;
    padding: 4px 8px;
  }

  .header .status {
    font-size: 9px;
    gap: 12px;
  }

  .test-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .action-button {
    font-size: 11px;
    padding: 10px 16px;
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
  }

  .container {
    height: auto;
    min-height: 100vh;
  }

  .header {
    padding: 0 12px;
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
  }

  .header-left {
    gap: 12px;
  }

  .header h1 {
    font-size: 11px;
    letter-spacing: 1px;
  }

  .header-links {
    gap: 6px;
  }

  .header-link {
    font-size: 9px;
    padding: 4px 6px;
  }

  .header-link svg {
    width: 12px;
    height: 12px;
  }

  .header .status {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding-bottom: 8px;
    font-size: 8px;
    gap: 16px;
  }

  .panel {
    padding: 12px;
  }

  .panel-title {
    font-size: 10px;
    margin-bottom: 12px;
  }

  .test-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .test-card {
    padding: 16px;
  }

  .test-card h3 {
    font-size: 12px;
    margin-bottom: 10px;
  }

  .test-card button {
    font-size: 11px;
    padding: 10px 20px;
    min-height: 44px;
  }

  .console {
    max-height: 300px;
    font-size: 10px;
    padding: 12px;
  }

  .console-line {
    padding: 4px 0;
    line-height: 1.6;
  }

  .action-button {
    font-size: 11px;
    padding: 12px 16px;
    min-height: 44px;
  }

  .actions-container {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stats-panel,
  .shortcuts-panel {
    font-size: 10px;
    padding: 12px;
  }

  .stats-title,
  .shortcuts-title {
    font-size: 10px;
    margin-bottom: 10px;
  }

  .feature-item {
    font-size: 9px;
    padding: 6px 0;
  }

  .feature-status {
    font-size: 8px;
  }

  .matrix-bg {
    display: none;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 10px;
  }

  .header-links {
    display: none;
  }

  .panel {
    padding: 8px;
  }

  .test-card {
    padding: 12px;
  }

  .test-card h3 {
    font-size: 11px;
  }

  .test-card button {
    font-size: 10px;
    padding: 8px 16px;
  }

  .console {
    max-height: 250px;
    font-size: 9px;
  }

  .action-button {
    font-size: 10px;
    padding: 10px 12px;
  }

  .stats-panel,
  .shortcuts-panel {
    font-size: 9px;
    padding: 10px;
  }
}
