* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

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

header {
  text-align: center; background: rgba(255,255,255,0.95); padding: 30px;
  border-radius: 20px; margin-bottom: 30px; backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

h1 { color: #4a5568; font-size: 2.5rem; margin-bottom: 10px; }
header p { color: #718096; font-size: 1.1rem; }

.tab-nav {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin-bottom: 30px;
}

.tab {
  background: rgba(255,255,255,0.2); color: white; border: none; padding: 12px 25px;
  border-radius: 25px; cursor: pointer; font-weight: bold; font-size: 1rem;
  transition: all 0.3s ease; backdrop-filter: blur(10px);
}

.tab:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); }
.tab.active { 
  background: linear-gradient(45deg, #ff6b6b, #ffa726); 
  box-shadow: 0 10px 20px rgba(255,107,107,0.3); 
}

.workspace { display: flex; justify-content: center; }

.method-panel {
  display: none; width: 100%; background: rgba(255,255,255,0.95);
  border-radius: 20px; padding: 30px; backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
}

.method-panel.active { display: grid; animation: fadeIn 0.5s ease-in; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

h2 { color: #2d3748; margin-bottom: 20px; font-size: 1.5rem; }

.input-group { display: flex; flex-direction: column; gap: 15px; }

label { font-weight: bold; color: #4a5568; }

input[type="text"], input[type="number"] {
  padding: 12px; border: 2px solid #e2e8f0; border-radius: 8px;
  font-size: 1rem; transition: border-color 0.3s;
}

input:focus { outline: none; border-color: #4299e1; }

button {
  background: linear-gradient(45deg, #4299e1, #667eea);
  color: white; border: none; padding: 15px 30px; border-radius: 8px;
  font-size: 1rem; font-weight: bold; cursor: pointer; transition: 0.3s;
}

button:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(66,153,225,0.3); }

.steps-display {
  background: #f7fafc; padding: 20px; border-radius: 10px; border-left: 4px solid #4299e1;
  font-family: 'Courier New', monospace; white-space: pre-line; line-height: 1.6;
  max-height: 400px; overflow-y: auto; color: #2d3748;
}

.graph-section { display: flex; align-items: center; justify-content: center; }

canvas { max-width: 100%; border-radius: 10px; background: white; }

.point-inputs { display: flex; flex-direction: column; gap: 10px; }
.point-inputs div { display: flex; gap: 10px; }
.point-inputs input { flex: 1; }

.highlight { background: linear-gradient(45deg, #ffd89b, #19547b); color: white; padding: 2px 8px; border-radius: 4px; }

@media (max-width: 768px) {
  .method-panel { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
}