* {
  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;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

.section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  margin-bottom: 20px;
}

.section h2 {
  margin-bottom: 20px;
  color: #667eea;
}

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

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

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

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

/* Przyciski */
.btn {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-danger {
  background: #e74c3c;
  color: white;
}

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

/* Status box */
.status-box {
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 500;
}

.status-box.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-box.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-box.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Panel gry */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.game-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
}

.info-item {
  display: flex;
  gap: 10px;
}

.info-item .label {
  font-weight: 600;
  color: #666;
}

.info-item .value {
  color: #333;
  font-weight: 500;
}

.status-connecting {
  color: #f39c12;
}

.status-connected {
  color: #27ae60;
}

.status-error {
  color: #e74c3c;
}

/* Panel pytań */
.question-panel {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border-left: 4px solid #667eea;
}

.question-panel h3 {
  margin-bottom: 15px;
  color: #667eea;
}

.question-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-content .waiting {
  color: #999;
  font-style: italic;
}

.question-content .question-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  text-align: center;
}

/* Informacje o odpowiedzi */
.answer-info {
  background: #e8f5e9;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
  margin-bottom: 15px;
}

.answer-sent {
  margin-bottom: 8px;
}

.answer-value {
  display: inline-block;
  padding: 4px 12px;
  background: #4caf50;
  color: white;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 8px;
}

.answer-time {
  color: #666;
}

/* Wynik */
.result-info {
  background: #fff3cd;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
}

/* Log eventów */
.log-panel {
  margin-top: 20px;
}

.log-panel h3 {
  margin-bottom: 15px;
  color: #667eea;
}

.event-log {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 15px;
  border-radius: 8px;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.log-entry {
  padding: 6px 0;
  border-bottom: 1px solid #333;
}

.log-entry:last-child {
  border-bottom: none;
}

.log-info {
  color: #4fc3f7;
}

.log-success {
  color: #81c784;
}

.log-error {
  color: #e57373;
}

.log-warning {
  color: #ffb74d;
}

.log-timestamp {
  color: #888;
  margin-right: 8px;
}

/* Footer */
.footer {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.footer summary {
  cursor: pointer;
  font-weight: 600;
  color: #667eea;
  padding: 10px;
  user-select: none;
}

.footer summary:hover {
  color: #764ba2;
}

.tech-info {
  padding: 20px 10px;
  color: #555;
}

.tech-info h4 {
  margin-top: 15px;
  margin-bottom: 10px;
  color: #667eea;
}

.tech-info ul {
  margin-left: 20px;
  line-height: 1.8;
}

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

/* Utility classes */
.hidden {
  display: none !important;
}

/* Responsywność */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .game-header {
    flex-direction: column;
    gap: 15px;
  }
  
  .game-info {
    grid-template-columns: 1fr;
  }
  
  .btn {
    width: 100%;
  }
}
