.interactive-container {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.interactive-controls {
  flex: 1;
  min-width: 300px;
}

.interactive-grid-wrapper {
  flex: 1;
  min-width: 300px;
}

.interactive-grid {
  display: grid;
  grid-template-areas: 
    "header header header"
    "sidebar main main"
    "footer footer footer";
  grid-template-rows: 60px 200px 50px;
  grid-template-columns: 150px 1fr 1fr;
  gap: 10px;
  background: #e9ecef;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
}

.interactive-grid > div {
  background: #007bff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: bold;
}

.interactive-grid .header { grid-area: header; background: #28a745; }
.interactive-grid .sidebar { grid-area: sidebar; background: #ffc107; color: #212529; }
.interactive-grid .main { grid-area: main; background: #007bff; }
.interactive-grid .footer { grid-area: footer; background: #dc3545; }

.layout-btn {
  display: inline-block;
  padding: 8px 16px;
  margin: 5px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.layout-btn:hover {
  background: #0056b3;
}

.layout-btn.active {
  background: #28a745;
}

.code-output {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 15px;
  margin-top: 10px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-x: auto;
}