/* Common styles for GeoGebra Copy Case */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  color: #334155;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

header {
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #1e293b;
}

header a {
  text-decoration: none;
  color: #2563eb;
  font-weight: 500;
}

header a:hover {
  text-decoration: underline;
}

.content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.canvas {
  width: 100%;
  height: 500px; /* Default height */
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #fff;
}

.controls {
  padding: 10px;
  background-color: #f1f5f9;
  border-radius: 4px;
}

.controls h3 {
  margin-top: 0;
  font-size: 1.1rem;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

.control-group {
  margin-bottom: 15px;
}

.control-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  font-size: 0.9rem;
}

.control-group input[type="text"],
.control-group input[type="number"],
.control-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-sizing: border-box; /* Ensure padding doesn't affect width */
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

button {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #1d4ed8;
}

button.secondary {
  background-color: #64748b;
}

button.secondary:hover {
  background-color: #475569;
}

.explanation {
  margin-top: 20px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.explanation h3 {
  margin-top: 0;
  font-size: 1.1rem;
}

.explanation p {
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Card layout for index page */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.card {
  display: block;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 15px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.card h3 {
  margin: 0 0 8px 0;
  color: #2563eb;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

nav {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

nav a {
  text-decoration: none;
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
}

nav a:hover {
  color: #2563eb;
}

footer {
  margin-top: 40px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  padding-bottom: 20px;
}
