/* --- TOP CONTROLS --- */

.matrix-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.styled-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  font-size: 15px;
}

/* --- MATRIX WORKSPACE (3 columns) --- */

.matrix-workspace-premium {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.9fr; /* enlarge A & B, reduce result */
  gap: 20px;
  margin-top: 12px;
}

/* --- Matrix A & B Boxes (Less Boxy) --- */

.matrix-box {
  background: #ffffff;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: none; /* remove heavy shadow */
}

.matrix-box:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.matrix-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}

/* --- Matrix Inputs: Make Larger --- */

.matrix-grid {
  display: grid;
  gap: 8px;
}

.matrix-grid input {
  padding: 14px;              /* bigger input */
  height: 48px;               /* taller input */
  font-size: 16px;            /* larger numbers */
  text-align: center;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  transition: .15s ease;
}

.matrix-grid input:focus {
  border-color: #0ea5a4;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(14,165,164,0.25);
}

/* --- RESULT BOX: Reduce Size / Weight --- */

.result-wrapper {
  background: #ffffff;
  padding: 12px;            /* smaller padding */
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  min-height: 140px;        /* smaller height */
  display: flex;
  justify-content: center;
  align-items: center;
}

.result-matrix-container {
  padding: 10px 20px;
  background: #f1f5f9;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  position: relative;
}

/* Slimmer matrix brackets */
.result-matrix-container::before,
.result-matrix-container::after {
  content: "";
  position: absolute;
  height: 70%;
  width: 10px;
  border: 2px solid #475569;
  border-top: none;
  border-bottom: none;
}

.result-matrix-container::before {
  left: -12px;
  border-right: none;
}

.result-matrix-container::after {
  right: -12px;
  border-left: none;
}

/* Result text */
.result-matrix {
  font-family: "Courier New", monospace;
  font-size: 15px;
  white-space: pre;
  letter-spacing: 0.3px;
  color: #1e293b;
}
