:root {
  --primary-color: #6C5CE7;
  --secondary-color: #00CEC9;
  --accent-color: #FDCB6E;
  --bg-color: #F0F3F8;
  --panel-bg: #FFFFFF;
  --text-color: #2D3436;
  --success-color: #00B894;
  --danger-color: #D63031;
}

/* Force WordPress container to stretch full width */
.growmath-logickid-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  background-color: var(--bg-color);
  font-family: 'Comic Sans MS', 'Chalkboard SE', sans-serif;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  margin: 10px 0;
  box-sizing: border-box;
}

.growmath-logickid-wrapper * { 
  box-sizing: border-box; 
}

.app-header {
  height: 50px;
  background: var(--primary-color);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-weight: bold;
}

/* 3-PANEL GRID SYSTEM (Ensures Middle Blockly Workspace gets space) */
.dashboard-container {
  display: grid;
  grid-template-columns: 300px minmax(350px, 1fr) 340px;
  gap: 12px;
  padding: 12px;
  height: 720px;
  width: 100%;
}

.panel {
  background: var(--panel-bg);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
}

/* LEFT PANEL STYLES */
.left-panel {
  overflow-y: auto;
}

.module-dropdown,
.level-dropdown {
  width: 100%;
  padding: 8px 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  margin-bottom: 10px;
  font-family: inherit;
}

.level-dropdown {
  margin-bottom: 10px;
}

.badges-list {
  font-size: 11px;
  background: #F8F9FA;
  border-radius: 4px;
  padding: 6px;
  min-height: 16px;
}

.hint-ladder {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.btn-ladder {
  background: #E9ECEF;
  color: var(--text-color);
  font-size: 11px;
  padding: 6px;
}

.btn-ladder:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.info-card {
  background: #F8F9FA;
  border-left: 4px solid var(--accent-color);
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 4px;
  font-size: 11px;
}

/* MIDDLE PANEL (BLOCKLY WORKSPACE FIX) */
.middle-panel { 
  padding: 0; 
  position: relative; 
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 300px;
}

.blockly-toolbar { 
  height: 35px; 
  background: #E9ECEF; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 0 12px; 
  font-weight: bold; 
  font-size: 12px; 
}

.blockly-workspace { 
  width: 100%; 
  height: calc(100% - 35px); 
  position: relative;
}

/* RIGHT PANEL STYLES */
.right-panel {
  display: flex;
  flex-direction: column;
}

.stage-controls { display: flex; gap: 8px; margin-bottom: 8px; }
.btn { flex: 1; padding: 8px; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 12px; }
.btn-success { background: var(--success-color); color: white; }
.btn-danger { background: var(--danger-color); color: white; }
.btn-secondary { background: var(--accent-color); color: var(--text-color); width: 100%; }

.canvas-wrapper { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  background: #1e1e1e; 
  border-radius: 8px; 
  width: 100%;
}

#game-canvas { 
  width: 100% !important;
  max-width: 300px;
  height: auto !important;
  border-radius: 8px; 
}

.output-console { 
  margin-top: 8px; 
  background: #2d3436; 
  color: #00ff66; 
  padding: 8px; 
  border-radius: 6px; 
  flex: 1; 
  font-family: monospace; 
  font-size: 11px; 
  overflow-y: auto; 
}

.buddy-card { display: flex; align-items: center; gap: 8px; background: #f0f3ff; border: 2px solid #6c5ce7; border-radius: 8px; padding: 6px; margin-bottom: 8px; }
.buddy-avatar { font-size: 24px; }
.buddy-speech { font-size: 10px; color: #2d3436; font-weight: 600; }

.student-analytics-card { background: #fff; border: 1px solid #E9ECEF; border-radius: 8px; padding: 8px; font-size: 10px; }
.progress-track { height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--success-color); transition: width 0.3s; }
.stats-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin: 6px 0; }
.stat-box { background: #F8F9FA; border-radius: 4px; padding: 4px; text-align: center; }