:root{
  --bg:#f7f8f9;
  --panel:#ffffff;
  --text:#1f2a32;
  --muted:#6b7580;
  --accent:#2b6ea3; /* This is the nice blue color */
  --border:#e1e6eb;
  --shadow: rgba(16,24,32,0.06);
}

/* Page base */
html,body {
  height: auto;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow:auto;
}

.page {
  max-width: 1200px;
  margin: 18px auto;
  padding: 18px;
}

header {
  display:flex;
  align-items:center;
  gap:18px;
  justify-content:space-between;
}

h2 {
  margin: 0;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.2px;
}

/* Controls/buttons */
button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 8px 14px;
  margin: 0;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 120ms ease;
  box-shadow: 0 1px 2px var(--shadow);
}
button:hover {
  background: rgba(43,110,163,0.06);
  transform: translateY(-1px);
}
/* Ensure generic button:disabled still looks appropriate */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: transparent;
}


/* --- Primary Button: Text to Sign Language (.convertBtn) --- */

.convertBtn {
    background: var(--accent); /* Solid Blue Background */
    color: var(--panel); /* White Text */
    border-color: var(--accent);
}

.convertBtn:hover {
    background: #255a86; /* Slightly darker blue on hover */
    border-color: #255a86;
    box-shadow: 0 2px 4px var(--shadow);
}

.videoBtn {
    background: var(--accent); /* Solid Blue Background */
    color: var(--panel); /* White Text */
    border-color: var(--accent);
}

.videoBtn:hover {
    background: #255a86; /* Slightly darker blue on hover */
    border-color: #255a86;
    box-shadow: 0 2px 4px var(--shadow);
}

.videoBtn[disabled] {
  opacity: 0.55;
  cursor: default;
  background: var(--accent);
}

/* --- End Primary Button --- */


/* Layout */
main {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 18px;
  margin-top: 18px;
}

.visualizer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 4px 14px var(--shadow);
}

.aslPanel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 14px var(--shadow);
  display:flex;
  flex-direction:column;
  gap:18px;
}

/* Distinct modules inside right panel */
.module {
  background: #fcfdff;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(16,24,32,0.04);
}

.module + .module {
  margin-top: 10px;
}

.moduleTitle {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

/* Text input */
#aslInput {
  width: 93%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: monospace;
  font-size: 16px;
  border-radius: 8px;
  outline: none;
  min-height: 80px;
  resize: vertical;
  line-height: 1.45;
}
#aslInput:focus {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(43,110,163,0.08);
}

.convertRow {
  display:flex;
  gap:8px;
  align-items:center;
}

/* Module notes / placeholders */
.moduleNote, .placeholderBox, .statusLine {
  background: #fbfcfd;
  border: 1px solid var(--border);
  padding: 10px;
  color: var(--text);
  width: 93%;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Recording controls */
.recordRow {
  display:flex;
  gap:8px;
  align-items:center;
  margin-top: 6px;
}
.recordBtn {
  background: var(--accent);
  color: var(--panel);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.recordBtn:hover {
    background: #255a86; /* Slightly darker blue on hover */
    border-color: #255a86;
    box-shadow: 0 2px 4px var(--shadow);
}

/* Speech button uses a light accent background to differentiate it */
.speechBtn {
  background: var(--accent);
  color: var(--panel);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.speechBtn[disabled] {
  opacity: 0.55;
  cursor: default;
  background: var(--accent); 
}

.speechBtn:hover {
    background: #255a86; /* Slightly darker blue on hover */
    border-color: #255a86;
    box-shadow: 0 2px 4px var(--shadow);
}

.recordStatus {
  color: var(--muted);
  font-size: 13px;
}

/* Canvas */
canvas {
  display:block;
  width: 100%;
  height: auto;
  background: #fcfdff;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 980px) {
  main { grid-template-columns: 1fr; }
  .aslPanel { order: 2; }
  .visualizer { order: 1; }
}

/* Footer */
footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
