@font-face {
  font-family: '1Regular';
  src: url('./fonts/1Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: '1Bold';
  src: url('./fonts/1Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: '2Regular';
  src: url('./fonts/2Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: '2Bold';
  src: url('./fonts/2Bold.ttf') format('truetype');
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: '2Italic';
  src: url('./fonts/2Italic.ttf') format('truetype');
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: '2BoldItalic';
  src: url('./fonts/2BoldItalic.ttf') format('truetype');
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: '3Regular';
  src: url('./fonts/3Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* =====================
   ROOT VARIABLES
===================== */

:root {
  --beige: #FFE3D5;
  --white: #FFFFFF;
  --orange: #EB8457;
  --dark-text: #2D2D2D;

  --shadow-main: 0 6px 16px rgba(0,0,0,0.5);

  --scrollbar-width: 0px;

  /* Layout system */
  --header-height: 60px;
  --section-gap: 4rem; /* 🔥 UNIFIED gap between blocks */
}

/* =====================
   BASE
===================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--beige);
  font-family: '2Regular';
  line-height: 1.6;
  overflow-x: hidden;
}

/* =====================
   HEADER COMPENSATION
===================== */

main {
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
}

/* =====================
   SECTIONS LAYOUT
===================== */

.section {
  width: 100%;
}

/* Margin ONLY between sections */
.section + .section {
  margin-top: var(--section-gap);
}

/* Footer - logical conclusion, no outer gap */
.section + footer {
  margin-top: var(--section-gap);
}

/* =====================
   PAGE CONTAINER
===================== */

.page-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ===== MODAL STYLES (CSP-safe, same as /main) ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-visible {
  display: flex !important;
}

.modal-content {
  background: white;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #ddd;
}

.modal-title {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #000;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #ddd;
  text-align: center;
}

.btn-modal-close {
  padding: 10px 30px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.btn-modal-close:hover {
  background: #5a6268;
}

/* Game details */
.game-details-info {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.detail-row:last-child {
  border-bottom: none;
}

.details-section-title {
  margin: 20px 0 10px 0;
  font-size: 16px;
  color: #333;
}

.game-details-messages {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 15px;
  background: #fafafa;
  max-height: 400px;
  overflow-y: auto;
}

.round-messages {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.round-messages:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.round-messages h5 {
  margin: 0 0 10px 0;
  color: #007bff;
}

.message-item {
  padding: 8px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}

.message-item:last-child {
  margin-bottom: 0;
}

.message-team {
  font-weight: bold;
  margin-right: 8px;
}

.message-author {
  font-weight: bold;
  margin-right: 8px;
}

.message-text {
  color: #333;
}

.message-time {
  font-size: 11px;
  color: #666;
  display: block;
  text-align: right;
  margin-top: 4px;
}

.no-messages {
  text-align: center;
  color: #666;
  padding: 20px;
}

.modal-open {
  overflow: hidden;
}
/* ===== END MODAL STYLES ===== */

/* ===== Added by audit fix N9 ===== */
.profile-empty-cell {
  text-align: center;
}
.profile-error-cell {
  color: red;
}
/* ===== End N9 ===== */

