/* ============================================
   炸金花 - 全局样式
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #e74c3c;
  --primary-dark: #c0392b;
  --secondary: #2ecc71;
  --secondary-dark: #27ae60;
  --gold: #f39c12;
  --dark: #1a1a2e;
  --darker: #16213e;
  --card-bg: #0f3460;
  --text: #eee;
  --text-muted: #aaa;
  --danger: #e74c3c;
  --success: #2ecc71;
  --warning: #f39c12;
}

body {
  font-family: 'Microsoft YaHei', 'PingFang SC', -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--dark), var(--darker));
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============ 大厅页面 ============ */

.lobby-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lobby-header {
  text-align: center;
  margin-bottom: 30px;
}

.lobby-header h1 {
  font-size: 48px;
  background: linear-gradient(45deg, var(--gold), #e74c3c, var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 16px;
}

.online-stats {
  margin-top: 12px;
  color: var(--secondary);
  font-size: 14px;
}

.lobby-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  width: 100%;
  backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label, .settings-row label {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

input[type="text"], select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

input[type="text"]:focus, select:focus {
  border-color: var(--gold);
}

select {
  cursor: pointer;
}

select option {
  background: var(--darker);
  color: var(--text);
}

.lobby-actions {
  margin-top: 20px;
}

.action-section {
  margin-bottom: 20px;
}

.action-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--gold);
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.settings-row select {
  width: 120px;
}

.settings-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--gold);
}

.divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.divider span {
  background: transparent;
  color: var(--text-muted);
  padding: 0 15px;
  font-size: 14px;
}

/* ============ 按钮 ============ */

.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #e67e22);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #c0392b);
  color: white;
}

.btn-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ready {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: white;
  font-size: 20px;
  padding: 15px 40px;
}

.btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.btn-small:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============ 提示 ============ */

.lobby-footer {
  margin-top: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============ Toast ============ */

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  transition: all 0.3s;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  animation: toastIn 0.3s ease-out;
}

.toast.toast-error {
  background: var(--danger);
  color: white;
}

.toast.toast-success {
  background: var(--success);
  color: white;
}

.toast.toast-info {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hidden {
  display: none !important;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ============ 响应式 ============ */

@media (max-width: 500px) {
  .lobby-header h1 {
    font-size: 36px;
  }

  .lobby-card {
    padding: 20px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 14px;
  }
}
