:root {
  --primary: #FF0000;
  --primary-dark: #CC0000;
  --primary-light: #FF6666;
  --secondary: #0066FF;
  --secondary-dark: #0052CC;
  --background: #ffffff;
  --surface: #f8f9fa;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --border: #ecf0f1;
  --success: #27ae60;
  --warning: #f39c12;
  --error: #FF0000;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header & Navigation moved to ../shared/topbar-admin-sync.css */

.content {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 60px 32px;
  text-align: center;
}

.page-header h1 {
  font-size: 42px;
  margin: 0;
}

.page-content {
  flex-grow: 1;
  padding: 60px 32px;
  max-width: none;
  width: 100%;
  margin: 0;
}

.placeholder {
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 60px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 18px;
}

/* ============== Footer ============== */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 60px 32px 24px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px;
  max-width: none;
  width: 100%;
  margin: 0 0 40px;
}

.footer-col h4 {
  margin-bottom: 16px;
  font-size: 16px;
}

.footer-col p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}

.rules-root {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rules-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.info-controls {
  margin-bottom: 12px;
  width: 100%;
  overflow: hidden;
}

.rules-title {
  margin: 0 0 12px;
  font-size: 28px;
}

.rules-section h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-weight: 600;
  max-width: 100%;
  min-width: 0;
}

.filter select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text-primary);
  max-width: min(100%, 760px);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-text-block {
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
  line-height: 1.75;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.info-text-rich {
  white-space: normal;
}

.info-text-line {
  padding: 2px 0;
}

.info-text-line.empty {
  height: 10px;
  padding: 0;
}

.info-text-line.strong {
  font-weight: 700;
  color: #1f2937;
}

.info-text-line.meta {
  border-left: 3px solid var(--primary);
  padding-left: 10px;
  background: rgba(255, 0, 0, 0.04);
  border-radius: 4px;
}

.pdf-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.pdf-image-viewer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: #f8fafc;
}

.pdf-page {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.pdf-page-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.pdf-loading {
  text-align: center;
  color: var(--text-secondary);
  padding: 24px 12px;
}

.pdf-loading.error {
  color: #b42318;
}

.placeholder.error {
  border-color: #f8d7da;
  background: #fff5f5;
  color: #b42318;
}

/* ============== Responsive Design ============== */
@media (max-width: 900px) {
/* Profile dropdown mobile */
.page-header {
    padding: 40px 20px;
  }

  .page-header h1 {
    font-size: 28px;
  }

  .page-content {
    padding: 40px 20px;
  }

  .placeholder {
    padding: 40px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
.brand-text {
    font-size: 16px;
  }

  .page-header {
    padding: 30px 16px;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .page-content {
    padding: 30px 16px;
  }

  .rules-title {
    font-size: 22px;
  }

  .rules-section {
    padding: 12px;
  }

  .filter {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .filter select {
    width: 100%;
    max-width: 100%;
  }

  .placeholder {
    padding: 30px;
    font-size: 16px;
  }

  .footer {
    padding: 40px 16px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-col h4 {
    font-size: 14px;
  }

  .footer-col p,
  .footer-col a {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .pdf-image-viewer {
    padding: 8px;
  }
}
