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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 40px;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.5rem;
  color: #2d3748;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1.1rem;
  color: #718096;
}

.back-link {
  display: inline-block;
  margin-top: 10px;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.back-link:hover {
  text-decoration: underline;
}

.warning-box {
  background: #fed7d7;
  border-left: 4px solid #f56565;
  padding: 15px;
  margin-bottom: 30px;
  border-radius: 4px;
  color: #742a2a;
}

.info-box {
  background: #bee3f8;
  border-left: 4px solid #4299e1;
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 4px;
}

.info-box h3 {
  color: #2c5282;
  margin-bottom: 10px;
}

.info-box p {
  color: #2d3748;
  line-height: 1.6;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.demo-card {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.demo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-color: #667eea;
}

.demo-card .icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.demo-card h2 {
  font-size: 1.3rem;
  color: #2d3748;
  margin-bottom: 10px;
}

.demo-card p {
  color: #718096;
  margin-bottom: 20px;
  line-height: 1.5;
}

.btn {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin: 5px;
}

.btn:hover {
  background: #5568d3;
}

.btn-secondary {
  background: #718096;
}

.btn-secondary:hover {
  background: #4a5568;
}

.btn-warning {
  background: #ed8936;
}

.btn-warning:hover {
  background: #dd6b20;
}

.btn-danger {
  background: #f56565;
}

.btn-danger:hover {
  background: #e53e3e;
}

.info-section {
  background: #edf2f7;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.info-section h3 {
  color: #2d3748;
  margin-bottom: 15px;
}

.info-section p {
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: 10px;
}

footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  color: #718096;
}

.demo-section {
  background: #f7fafc;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.demo-section h2 {
  color: #2d3748;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.attack-examples {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
}

.attack-examples h3 {
  color: #e53e3e;
  margin-bottom: 15px;
}

.attack-examples ul {
  list-style: none;
}

.attack-examples li {
  margin-bottom: 10px;
  padding: 10px;
  background: #fff5f5;
  border-left: 3px solid #fc8181;
  border-radius: 4px;
}

.attack-examples code {
  font-family: 'Courier New', monospace;
  color: #c53030;
  font-weight: 600;
}

.result-box {
  background: #edf2f7;
  padding: 25px;
  border-radius: 8px;
  margin-top: 30px;
}

.result-box.success {
  background: #c6f6d5;
  border-left: 4px solid #48bb78;
}

.result-box.error {
  background: #fed7d7;
  border-left: 4px solid #f56565;
}

.result-box h3 {
  color: #2d3748;
  margin-bottom: 15px;
}

.result-box p {
  color: #4a5568;
  line-height: 1.6;
}

.result-box table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: white;
}

.result-box th,
.result-box td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.result-box th {
  background: #2d3748;
  color: white;
  font-weight: 600;
}

.result-box pre {
  background: #2d3748;
  color: #68d391;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin-top: 15px;
}

.result-box code {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
}

.protection-box {
  background: #c6f6d5;
  border-left: 4px solid #48bb78;
  padding: 25px;
  border-radius: 8px;
  margin-top: 30px;
}

.protection-box h3 {
  color: #22543d;
  margin-bottom: 15px;
}

.protection-box ul {
  list-style: none;
}

.protection-box li {
  color: #2f855a;
  margin-bottom: 8px;
  font-weight: 500;
}

.comments-section {
  margin-top: 30px;
}

.comments-section h2 {
  color: #2d3748;
  margin-bottom: 20px;
}

.comment-box {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
}

.comment-header {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 8px;
}

.comment-content {
  color: #2d3748;
  line-height: 1.6;
}

.empty-message {
  color: #a0aec0;
  text-align: center;
  padding: 30px;
  font-style: italic;
}

.bot-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.stats-box {
  background: white;
  padding: 25px;
  border-radius: 8px;
  margin-top: 20px;
}

.stats-box h3 {
  color: #2d3748;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: #f7fafc;
  border-radius: 8px;
}

.stat-label {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.stat-value {
  color: #2d3748;
  font-size: 1.8rem;
  font-weight: 700;
}

.warning-message {
  background: #fed7d7;
  color: #c53030;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #f56565;
  font-weight: 600;
  text-align: center;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.log-section {
  margin-top: 30px;
}

.log-section h3 {
  color: #2d3748;
  margin-bottom: 15px;
}

.log-container {
  background: #2d3748;
  border-radius: 8px;
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
}

.log-entry {
  color: #68d391;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.log-entry.error {
  color: #fc8181;
}

.log-time {
  color: #a0aec0;
}

.log-status {
  color: #fbd38d;
  font-weight: 600;
}

@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  
  header h1 {
    font-size: 1.8rem;
  }
  
  .demo-grid {
    grid-template-columns: 1fr;
  }
  
  .bot-controls {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}
