/* Global reset-ish */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: url("castle-bg.jpg") no-repeat center center fixed;
  background-size: cover;
  font-family: 'Times New Roman', serif;
  color: #f0e6d2;
  line-height: 1.6;
}

/* Dark overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: -1;
}

/* Helpers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* Layout */
.site-header {
  text-align: center;
  padding: 30px 20px 10px;
}

.site-header-inner {
  max-width: 900px;
  margin: 0 auto;
}

.site-title {
  font-size: 42px;
  color: #d4af37;
  text-shadow: 0 2px 8px black;
  margin: 0 0 10px;
}

.site-tagline {
  font-size: 18px;
  margin: 0;
}

/* Navigation */
.site-nav {
  margin-top: 20px;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 auto 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.site-nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #8b7355;
  background: rgba(0,0,0,0.7);
  color: #f0e6d2;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav a:hover {
  background: rgba(139,115,85,0.9);
  color: #fff7da;
}

.site-nav a.active {
  background: #d4af37;
  color: #1a1208;
  border-color: #d4af37;
}

/* Unity container */
.game-section {
  max-width: 960px;
  margin: 30px auto 20px;
  padding: 0 15px;
}

#unity-container {
  margin: 0 auto;
  width: 960px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

#unity-canvas {
  background: #231F20;
  width: 960px;
  height: 600px;
  max-width: 100%;
  border: 5px solid #8b7355;
  box-shadow: 0 0 40px rgba(0,0,0,0.7);
}

#unity-loading-bar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 400px;
  text-align: center;
  color: #d4af37;
  font-weight: bold;
  text-shadow: 0 0 6px black;
}

#unity-progress-bar-empty {
  width: 100%;
  height: 12px;
  background: rgba(51, 51, 51, 0.8);
  border-radius: 6px;
  margin-top: 12px;
  overflow: hidden;
}

#unity-progress-bar-full {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #d4af37, #b8860b);
  transition: width 0.2s ease;
}

#unity-warning {
  margin-top: 10px;
  max-width: 600px;
}

/* Fullscreen button */
#fullscreen-button {
  margin-top: 15px;
  padding: 12px 24px;
  background: linear-gradient(45deg, rgba(74, 74, 74, 0.85), rgba(42, 42, 42, 0.85));
  border: 3px solid #8b7355;
  color: #d4af37;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

#fullscreen-button:hover {
  background: linear-gradient(45deg, rgba(90, 90, 90, 0.9), rgba(58, 58, 58, 0.9));
}

/* Content sections */
.content-section {
  max-width: 900px;
  margin: 30px auto;
  padding: 20px;
  background: rgba(0,0,0,0.7);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.content-section h1,
.content-section h2,
.content-section h3 {
  color: #d4af37;
  margin-top: 0;
}

.content-section a {
  color: #d4af37;
  text-decoration: underline;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.feature-card {
  background: rgba(20, 20, 20, 0.85);
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(139, 115, 85, 0.7);
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 14px;
  background: rgba(0,0,0,0.8);
  margin-top: 40px;
}

.site-footer a {
  color: #d4af37;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Forms */
.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #8b7355;
  background: rgba(0,0,0,0.8);
  color: #f0e6d2;
}

.button-primary {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #d4af37;
  background: #d4af37;
  color: #1a1208;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.button-primary:hover {
  background: #f0d46e;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .site-title {
    font-size: 32px;
  }

  #unity-canvas {
    height: auto;
  }
}
