:root {
    --gold: #9e8a5f;
    --dark-purple: #0f0d23;
    --bg-gradient: linear-gradient(180deg, #000000 0%, #481775 100%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-gradient);
    color: #fff;
    font-family: 'Cinzel', serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Removed padding from body to allow nav to be full-width */
}

.logo img {
  height: 60px; /* Adjust this to match the scale of your header */
  width: auto;
  display: block;
}

/* --- NAVIGATION BAR --- */
nav {
  background: var(--dark-purple);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 60px;
  border-bottom: 2px solid #d4af37;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav h1 {
  color: #d4af37;
  font-size: 24px;
  font-family: 'Cinzel', serif;
  margin: 0;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: white;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  transition: 0.3s;
}

nav a:hover, nav a.active {
  color: #d4af37;
}

/* --- QUIZ LAYOUT --- */
.quiz-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    flex: 1;
}

.header-section h1 {
    font-family: 'Cinzel', serif;
    color: var(--white);
    text-shadow: 3px 3px 6px rgba(255, 255, 255, 0.8);
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 50px;
}

.questions-grid {
    display: grid;
    /* This creates as many columns as fit, at least 320px wide each */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    width: 100%;
    
    /* FIX: This centers the grid columns themselves */
    justify-content: center; 
    
    /* FIX: This centers the cards within those columns */
    justify-items: center; 
}

/* --- THE CARD STYLE --- */
.card {
    background: rgba(0, 0, 0, 0);
    padding: 40px;
    text-align: center;
    border: 40px solid transparent; 
    border-image: url('images/border.jpg') 100 round;
}

.option-btn {
    display: block;
    /* CHANGE: Set a specific width instead of 100% */
    width: 280px; 
    /* ADD: Center the button within the card */
    margin: 0 auto 12px auto; 
    
    background: rgba(255,255,255,0.03);
    border: 1px solid #3d3d3d;
    color: #d1d1d1;
    padding: 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.9rem;
}

.option-btn:hover {
    border-color: var(--gold);
    color: #fff;
    background: rgba(158, 138, 95, 0.1);
}

.option-btn.active {
    background: var(--gold);
    color: #000;
    font-weight: bold;
    border-color: var(--gold);
}

.main-btn {
    margin-top: 40px;
    padding: 15px 45px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    transition: 0.3s;
}

.main-btn:hover {
    background: var(--gold);
    transform: scale(1.05);
}

/* --- MODAL & OVERLAY --- */
#result-screen {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1625;
    padding: 50px;
    border: 3px solid var(--gold);
    z-index: 2000;
    text-align: center;
}

.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1500;
}

/* --- SKYLINE SILHOUETTE --- */
.skyline {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: url('images/skyline.png') repeat-x bottom; /* Add your skyline image here */
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

.core-img {
  width: 100%;
  height: auto;
  display: block;
}

/* If the last card is all alone on a row, this forces it to the center */
.card:last-child:nth-child(3n+1) {
    grid-column: 1 / -1;
    justify-self: center;
} 

/* Centers the entire section */
/* This makes the section the "anchor" for the buttons */
.section-core {
  position: relative; 
  width: 100%;
  line-height: 0; /* Removes extra gap under the background image */
}

.core-img {
  width: 100%;
  height: auto;
  display: block;
}

/* This container sits ON TOP of the background image */
.button-wrapper {
  position: absolute;
  bottom: 6%;         /* Adjust this % to move them up/down onto the shadows */
  left: 41.5%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 33px;           /* Fixed gap keeps them from drifting too far apart */
  width: 95%;          /* Increased from 80% to give them more room to grow */
  z-index: 10;
  overflow: hidden;
}

.nav-button {
  flex: 1;
  /* INCREASE THESE VALUES */
  max-width: 1500px;    /* Raising this from 300px makes them significantly larger */
  transition: transform 0.3s ease;
}

.nav-button img {
  width: 150%;         /* The image will now fill that larger 450px space */
  height: auto;
  display: block;
}

/* Fixes the overlap/hover issue */
.nav-button:hover {
  transform: scale(1.1);
  z-index: 20;
}

/* --- RETAKE BUTTON STYLING --- */
.retry-btn {
    padding: 15px 35px;
    background: transparent;
    color: var(--gold); /* Gold text */
    border: 2px solid var(--gold); /* Gold border */
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    margin-top: 20px;
    display: inline-block;
}

/* Hover Effect: Inverse colors */
.retry-btn:hover {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 15px var(--gold);
    transform: translateY(-2px);
}