/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --gold: #C9A84C;
  --gold-light: #F5E6B8;
  --white: #FFFFFF;
  --text: #1A1A1A;
  --text-muted: #555555;
  --surface: #FFFFFF;
  --border: #EEEEEE;
  --border-strong: #CCCCCC;
  --slant-height: 60px;
}

[data-theme="dark"] {
  --gold: #C9A84C;
  --gold-light: #1E1F24;
  --white: #141417;
  --text: #E4E4E8;
  --text-muted: #8E8E96;
  --surface: #1E1F24;
  --border: #2E2F35;
  --border-strong: #45464E;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  word-spacing: 0.05em;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.no-transition,
.no-transition *,
.no-transition *::before,
.no-transition *::after {
  transition: none !important;
}

/* ===== Typography ===== */
h1, h2 {
  font-family: 'Minion Pro Caption', Georgia, serif;
  word-spacing: normal;
}

h1 {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

p {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Sections ===== */
.section {
  padding: 80px 24px;
  text-align: center;
}

.section--white {
  background: var(--white);
}

.section--gold {
  background: var(--gold-light);
}

/* ===== Slanted Dividers ===== */
.slant-divider {
  position: relative;
  height: var(--slant-height);
  z-index: 2;
  pointer-events: none;
}

.slant-divider--white-to-gold {
  background: linear-gradient(
    to bottom right,
    var(--white) 50%,
    var(--gold-light) 50%
  );
}

.slant-divider--gold-to-white {
  background: linear-gradient(
    to bottom right,
    var(--gold-light) 50%,
    var(--white) 50%
  );
}

/* ===== Header / About Section ===== */
.logo {
  height: 160px;
  margin-bottom: 3rem;
}

.gold-divider {
  border: none;
  border-top: 2px solid var(--gold);
  width: 80px;
  margin: 0 auto 5rem;
}

.about-text {
  font-family: 'Minion Pro Caption', Georgia, serif;
  word-spacing: normal;
  font-size: 1.9rem;
  color: var(--text);
  line-height: 1.8;
}

/* ===== Games Section ===== */
.games-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.game-link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.game-link:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.game-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-image {
  display: block;
  max-width: 560px;
  width: 100%;
  height: auto;
}

.feedback-link {
  display: inline-block;
  margin-top: 40px;
  padding: 12px 32px;
  font-size: 1.3rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.feedback-link:hover {
  background: var(--gold);
  color: var(--white);
}

/* ===== Team Section ===== */
.headcount {
  font-size: 1.8rem;
}

.headcount-number {
  color: var(--gold);
  font-size: 3rem;
  font-weight: 700;
  vertical-align: middle;
  position: relative;
  top: -0.12em;
  margin: 0 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  line-height: inherit;
  transition: transform 0.1s ease;
}

.headcount-number:active {
  transform: scale(0.85);
}

/* ===== Careers Overlay ===== */
.careers-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.careers-overlay.active {
  display: flex;
}

.careers-modal {
  background: var(--white);
  border-radius: 12px;
  padding: 48px 40px;
  max-width: 600px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
  font-size: 1.3rem;
  line-height: 1.7;
}

.careers-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.careers-close:hover {
  color: var(--text);
}

.careers-location {
  margin-top: 1.8rem;
}

.careers-email {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.careers-email:hover {
  text-decoration: underline;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 1.15rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===== Feedback Form Page ===== */
.form-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 24px;
}

.form-container h1 {
  font-size: 3rem;
  margin-bottom: 0.25rem;
}

.form-game-image {
  display: block;
  max-width: 560px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0 auto 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group > label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.375rem;
  font-size: 1.3rem;
}

.form-group .optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.form-group select,
.form-group textarea,
.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  font-size: 1.3rem;
  font-family: inherit;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group textarea:focus,
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea {
  min-height: 220px;
  resize: vertical;
}

.form-submit {
  display: inline-block;
  padding: 14px 40px;
  font-size: 1.3rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--white);
  background: var(--gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.form-submit:hover {
  opacity: 0.9;
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-success {
  padding: 24px;
  background: #f0faf0;
  border: 1px solid #b2dfb2;
  border-radius: 8px;
  color: #2d6a2d;
  text-align: center;
  font-size: 1.3rem;
}

.form-error {
  padding: 12px;
  background: #fef0f0;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  color: #a03030;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

/* ===== File Upload ===== */
.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: 8px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.05);
}

.drop-zone-text {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  max-width: none;
}

.drop-zone label.drop-zone-browse {
  display: inline;
  cursor: pointer;
}

.drop-zone-hint {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: none;
  white-space: nowrap;
}

.file-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.file-preview {
  position: relative;
  width: 120px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.file-preview img,
.file-preview video {
  display: block;
  width: 100%;
  height: 80px;
  object-fit: cover;
}

.file-preview .file-info {
  padding: 6px 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview .file-info .file-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.file-preview .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.file-preview .remove-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.file-error {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fef0f0;
  border: 1px solid #f5c6c6;
  border-radius: 6px;
  color: #a03030;
  font-size: 0.95rem;
}

.upload-progress {
  margin-top: 12px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  display: none;
}

.upload-progress.active {
  display: block;
}

.upload-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  width: 0%;
  transition: width 0.2s;
}

/* ===== Dark Mode Overrides ===== */
[data-theme="dark"] .game-link {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .game-link:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .careers-modal {
  background: var(--surface);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .form-submit {
  color: #141417;
}

[data-theme="dark"] .form-success {
  background: #1A2E1A;
  border-color: #2D5A2D;
  color: #90D090;
}

[data-theme="dark"] .form-error {
  background: #2E1A1A;
  border-color: #5A2D2D;
  color: #F0A0A0;
}

[data-theme="dark"] .drop-zone:hover,
[data-theme="dark"] .drop-zone.dragover {
  background: rgba(201, 168, 76, 0.1);
}

[data-theme="dark"] .file-error {
  background: #2E1A1A;
  border-color: #5A2D2D;
  color: #F0A0A0;
}

[data-theme="dark"] .file-preview .remove-btn {
  background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .file-preview .remove-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.section, .slant-divider, .footer, .careers-modal, .form-container {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 20px;
  height: 20px;
}

/* Light mode: show moon (click to switch to dark) */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Dark mode: show sun (click to switch to light) */
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  .section { padding: 64px 20px; }
  .game-image { max-width: 100%; }
  :root { --slant-height: 40px; }
}
