/* - Imports -*/
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&display=swap');


/* - Variables -*/
:root {
  --SGold: #ffc66b;
  --APurple: #873487;
  --BBlue: #00aaff;
  --bg-dark: #0b0b0c;
  --border: #2a2a2e;
  --text-main: #f0f0f0;
  --font-display: "Cinzel", "Playfair Display", serif;
}


/* - Base/General -*/
body {
  background-color: #060606;
  background-image:url('https://dismyth.neocities.org/arrestsim/src/assets/arrestbg.png');  
  background-size:cover;
  background-attachment:fixed;  
  color: var(--text-main);
  font-size:12px;
  font-family: Arial, sans-serif;
  margin: 20px;
}

select {
  background-color: #444444;
  color:#ffffff;
  border: 1px solid var(--border);
}

/* Page container */
#contain {
  background-color: var(--bg-dark);  
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border: 2px solid var(--border);
  border-radius: 8px;
  box-sizing: border-box;
}


/* - Text -*/
b, strong {
  font-weight:bold;
}

a {
  color:#918ae4;
  font-weight:bold;
}

h1 {
  font-size: 30px;
  padding: 30px;
  font-family: var(--font-display);
  font-weight: 500;
  text-align: center;
}

h2 {
  font-size:20px;
  font-family: var(--font-display);
  font-weight:lighter;
  text-align: center;  
  margin-bottom: 10px;
}

h3 {
  height:25px;
  background-color: #1d1d1d;
  border-bottom: 2px solid var(--border);
  margin-top: 0;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: lighter;
  text-align: center;
}

li {
  margin-bottom: 5px;
}

/* - Instruction Wrapper - */
#instructions {
  align-items: center;
  position: relative;
  gap: 5px 10px;
  margin-top: 15px;
  margin-bottom:15px;
  padding:15px;
  text-align: center;
  font-weight: lighter;
  border-top: 2px solid var(--border);  
  border-bottom: 2px solid var(--border);
}

#changelog {
  align-items: center;
  position: relative;
  gap: 5px 10px;
  margin-top: -15px;
  margin-bottom:15px;
  padding:15px;
  text-align: center;
  font-weight: lighter;
  border-bottom: 2px solid var(--border); 
}

/* - Controls & Buttons -*/
.controls, .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
  font-size:14px;
  font-weight:bold;
}

.controls div, .buttons div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

button {
  padding: 10px 20px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  background-color: #444;
  color: #fff;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #666;
}


/* - Map + Pull Display -*/
#map-container {
  width:100%;
  max-width: 1200px;
  aspect-ratio: 2 / 1;
  margin: 0 auto 20px auto;
  background-color: #1e1e1e;
  border: 2px solid var(--border);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background-image: url('./src/assets/map.png');
  background-size: cover;
  background-position: center;
}

#pull-results {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}


/* - Map Lights (base) -*/
.map-light {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 60%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  transform-origin: 50% 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.map-light::before { /* Outer ring */
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 6px rgba(255,255,255,0.2);
  pointer-events: none;
}

.map-light::after {  /* Light pillar */
  transform-origin: 50% 50%; 
}

    /* S-class Lights */
    .map-light.s-class::before {
      width: 42px;
      height: 42px;
      margin-left: -21px;
      margin-top: -21px;
      border-color: rgba(255, 215, 0, 0.3);
      box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
    }

    .map-light.s-class {
      width: 20px;
      height: 20px;
      background: radial-gradient(circle, #ffee90 30%, rgba(255, 215, 0, 0.33) 60%);
      border-color: var(--SGold);
      box-shadow:
          0 0 18px var(--SGold),
          0 0 30px rgba(255, 215, 0, 0.5),
          0 0 45px rgba(255, 215, 0, 0.4),
          0 0 60px rgba(255, 215, 0, 0.3);
      z-index: 2;
      opacity: 0;
      position: relative;
      animation: sClassPop 0.4s ease forwards, sClassPulse 2s 0.4s infinite ease-in-out;
      transform-origin: 50% 50%;
    }

    .map-light.s-class::after {
      content: '';
      position: absolute;
      left: 50%;
      bottom: 50%;
      width: 50px;
      height: 90px;
      margin-left: -25px;
      background: radial-gradient(ellipse at bottom, rgba(255, 215, 0, 0.5) 0%, rgba(255, 215, 0, 0) 80%);
      border-radius: 50%;
      pointer-events: none;
      transform-origin: 50% 100%;
      z-index: -1;
      opacity: 0;
      will-change: transform, opacity;
      animation: pillarPop 0.4s ease forwards;
    }

    /* A-class Lights */
    .map-light.a-class::before {
      width: 30px;
      height: 30px;
      margin-left: -15px;
      margin-top: -15px;
      border-color: var(--APurple);
      box-shadow: 0 0 12px var(--APurple);
    }    
    .map-light.a-class {
      background-color: var(--APurple);
      box-shadow: 0 0 10px 4px var(--APurple);
      width: 15px;
      height: 15px;
    }

    .map-light.a-class::after {
      content: '';
      position: absolute;
      left: 50%;
      bottom: 50%;
      width: 50px;
      height: 40px;
      margin-left: -25px;
      background: radial-gradient(ellipse at bottom, rgba(159, 103, 159, 0.459) 0%, rgba(255, 215, 0, 0) 80%);
      border-radius: 50%;
      pointer-events: none;
      transform-origin: 50% 100%;
      z-index: -1;
      opacity: 0;
      will-change: transform, opacity;
      animation: pillarPop 0.4s ease forwards;
    }

    /* B-class Lights */
    .map-light.b-class {
      background-color: var(--BBlue);
      box-shadow: 0 0 10px 4px var(--BBlue);
    }

    .map-light.b-class::after {
      content: '';
      position: absolute;
      left: 50%;
      bottom: 50%;
      width: 50px;
      height: 20px;
      margin-left: -25px;
      background: radial-gradient(ellipse at bottom, rgba(165, 214, 251, 0.459) 0%, rgba(255, 215, 0, 0) 80%);
      border-radius: 50%;
      pointer-events: none;
      transform-origin: 50% 100%;
      z-index: -1;
      opacity: 0;
      will-change: transform, opacity;
      animation: pillarPop 0.4s ease forwards;
    }

      /* Makes the map lights fade in */
      .map-light.fade-in {
        opacity: 1;
        transition: opacity 0.3s ease;
      }


      /* - Animations -*/
      @keyframes sClassPop {
        0% { transform: scale(0) rotate(10deg) skewX(6deg); opacity: 0; }
        50% { transform: scale(1.5) rotate(10deg) skewX(6deg); opacity: 1; }
        100% { transform: scale(2, 1.8) rotate(10deg) skewX(6deg); opacity: 1; }
      }

      @keyframes pillarPop {
        0% { opacity: 0; transform: rotate(6deg) scale(0.5, 0.01); }
        60% { opacity: 0.9; transform: rotate(6deg) scale(0.5, 1.05); }
        100% { opacity: 1; transform: rotate(6deg) scale(0.5, 1.8); }
      }

      @keyframes sClassPulse {
        0% {
          transform: scale(2, 1.8) rotate(10deg) skewX(6deg) scale(1);
          box-shadow: 0 0 18px var(--SGold), 0 0 30px rgba(255, 215, 0, 0.5);
        }
        50% {
          transform: scale(2, 1.8) rotate(10deg) skewX(6deg) scale(1.1);
          box-shadow: 0 0 25px var(--SGold), 0 0 40px rgba(255, 215, 0, 0.7);
        }
        100% {
          transform: scale(2, 1.8) rotate(10deg) skewX(6deg) scale(1);
          box-shadow: 0 0 18px var(--SGold), 0 0 30px rgba(255, 215, 0, 0.5);
        }
}


/* - Mugshots - */
#mugshot-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.mugshot {
  width: 96px;
  height: 144px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: bold;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.4s ease;
}

.mugshot.s-class {
  border-color: var(--SGold);
  box-shadow:
      0 0 8px var(--SGold),
      0 0 16px rgba(255, 215, 0, 0.5),
      0 0 24px rgba(255, 215, 0, 0.3);
}

.mugshot.a-class {
   border-color: var(--APurple); 
  }
.mugshot.b-class { 
  border-color: var(--BBlue); 
}

.mugshot.show {
  opacity: 1;
  transform: translateY(0);
}

/* - Bottom Section Wrapper -*/
#bottom-wrap {
  margin: 0 auto;
  display: flex;
  gap: 20px;
}


/* - Pull History -*/
#history-container {
  flex: 1 1 300px;
  max-height: 300px;
  overflow-y: auto;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-size:14px;
  background-color: var(--bg-dark);
}

#history-table {
  width: 100%;
  border-collapse: collapse;
}

#history-table th,
#history-table td {
  border: 1px solid #303030;
  padding: 4px 8px;
  text-align: left;
  font-size:14px;
}

#history-table th {
  background-color: #1a1a1a;
}


#stats {
  height: 165px;
  flex: 1 1 300px;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background-color: var(--bg-dark);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 30px);
  gap: 5px 10px;
}

#stats h3 {
  grid-column: 1 / -1;
}

#stats p {
  margin: 6px 0;
  font-size: 13px;
  font-weight:normal;
}

/* - Rarity Colors -*/
.s-class {
  color: var(--SGold);
  font-weight: bold;
}

.a-class { 
  color: var(--APurple); 
}
.b-class { 
  color: var(--BBlue); 
}


/* - Scrollbar -*/
#history-container::-webkit-scrollbar {
  width: 8px;
}

#history-container::-webkit-scrollbar-track {
  background: #111;
}

#history-container::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}

#history-container::-webkit-scrollbar-thumb:hover {
  background: #888;
}