/* Xshow 家长中心 — 高对比黑白风格 */

body[data-parent-mode='true'] {
  background: linear-gradient(135deg, #2c3e50, #34495e);
}

body[data-parent-mode='true'] #app {
  background: #f5f5f5;
}

.parent-report {
  padding: var(--space-3);
  padding-bottom: var(--space-6);
}

.parent-section {
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.parent-section-title {
  font-size: 16px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid #eee;
}

.danger-section {
  border-color: #e74c3c;
}

.danger-section .parent-section-title {
  color: #e74c3c;
}

.parent-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

@media (min-width: 480px) {
  .parent-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.parent-stat-tile {
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  text-align: center;
}

.parent-stat-num {
  font-size: 28px;
  font-weight: bold;
  color: #2c3e50;
}

.parent-stat-label {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 4px;
}

.parent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: 15px;
  color: #2c3e50;
}

.parent-row.parent-action {
  background: #fff8e1;
  margin: var(--space-2) calc(-1 * var(--space-3));
  padding: var(--space-3);
  border-radius: var(--radius-sm);
}

.parent-rank {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.parent-rank-icon {
  font-size: 56px;
}

.parent-rank-info {
  flex: 1;
}

.parent-rank-name {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
}

.parent-rank-progress {
  font-size: 13px;
  color: #7f8c8d;
  margin: 4px 0 8px;
}

.parent-progress-bar {
  background: #ecf0f1;
  border-radius: 4px;
  height: 8px;
  overflow: hidden;
}

.parent-progress-fill {
  background: linear-gradient(90deg, var(--rank-gold), var(--orange));
  height: 100%;
  transition: width 0.5s;
}

.parent-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: var(--space-2);
}

.parent-badge {
  text-align: center;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid #eee;
}

.parent-badge.unlocked {
  background: #fff8e1;
  border-color: var(--rank-gold);
}

.parent-badge.locked {
  opacity: 0.4;
}

.parent-badge-emoji {
  font-size: 28px;
}

.parent-badge-name {
  font-size: 11px;
  color: #2c3e50;
  margin-top: 4px;
}

.parent-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.parent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.parent-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}

.parent-switch-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.parent-switch input:checked + .parent-switch-slider {
  background: var(--green);
}

.parent-switch input:checked + .parent-switch-slider::before {
  transform: translateX(20px);
}

.parent-privacy {
  font-size: 13px;
  color: #555;
  line-height: 1.8;
}

.parent-privacy a {
  color: var(--primary);
  text-decoration: underline;
}

.parent-privacy p {
  margin-bottom: 4px;
}

.parent-exit {
  width: 100%;
}

/* ===== 童锁弹窗 ===== */
.parent-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.parent-gate-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  min-width: 300px;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
}

.parent-gate-title {
  font-size: 20px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: var(--space-2);
}

.parent-gate-sub {
  font-size: 13px;
  color: #7f8c8d;
  margin-bottom: var(--space-4);
}

.parent-gate-question {
  font-size: 36px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: var(--space-4);
}

.parent-gate-options {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.parent-gate-option {
  background: white;
  border: 2px solid #ddd;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  min-width: 70px;
  transition: all 0.2s;
  font-family: inherit;
}

.parent-gate-option:hover:not(:disabled) {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.parent-gate-option.wrong {
  background: #e74c3c;
  color: white;
  border-color: #e74c3c;
}

.parent-gate-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-3);
}

.parent-gate-skip,
.parent-gate-change {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
  color: #555;
  cursor: pointer;
  font-family: inherit;
}

.parent-gate-hint {
  font-size: 12px;
  color: #95a5a6;
}

/* ===== 退出长按确认 ===== */
.exit-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  user-select: none;
  -webkit-user-select: none;
}

.exit-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  text-align: center;
  min-width: 280px;
}

.exit-title {
  font-size: 18px;
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: var(--space-4);
}

.exit-progress {
  background: #ecf0f1;
  border-radius: 8px;
  height: 16px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.exit-progress-fill {
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  height: 100%;
  width: 0;
  transition: width 0.05s linear;
}

.exit-hint {
  font-size: 14px;
  color: #7f8c8d;
  margin-bottom: var(--space-3);
}

.exit-cancel {
  background: transparent;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  font-family: inherit;
}

/* ===== Mock 广告 ===== */
.ad-mock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ad-mock-content {
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  min-width: 320px;
  max-width: 360px;
  color: white;
  text-align: center;
  position: relative;
}

.ad-mock-header {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: var(--space-3);
  opacity: 0.9;
}

.ad-mock-body {
  background: white;
  color: #333;
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.ad-mock-animation {
  font-size: 40px;
  margin-bottom: var(--space-3);
  animation: pulse 1.5s infinite;
}

.ad-mock-body p {
  margin-bottom: var(--space-2);
}

.ad-mock-body code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

.ad-mock-meta {
  font-size: 12px;
  color: #888;
}

.ad-mock-footer button {
  background: white;
  color: #333;
  border: none;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-5);
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}

.ad-mock-footer button:disabled {
  background: rgba(255, 255, 255, 0.5);
  cursor: not-allowed;
}

.ad-mock-footer button.ready {
  background: var(--green);
  color: white;
}

.ad-mock-early-close {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: rgba(255, 255, 255, 0.3);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

/* ===== 通用确认弹窗 ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.confirm-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  min-width: 280px;
  max-width: 360px;
  text-align: center;
}

.confirm-text {
  font-size: 16px;
  margin-bottom: var(--space-4);
  color: #2c3e50;
}

.confirm-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.confirm-cancel,
.confirm-ok {
  flex: 1;
  border: none;
  border-radius: var(--radius);
  padding: var(--space-3);
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
}

.confirm-cancel {
  background: #ecf0f1;
  color: #555;
}

.confirm-ok {
  background: var(--primary);
  color: white;
}

.popup-out {
  animation: popOut 0.3s forwards;
}
