#cardCanvasBackground,
#cardCanvasImage,
#cardCanvasText {
  position: absolute;
  left: -9999px;
  top: -9999px;
  visibility: hidden;
}

@font-face {
  font-family: 'FantaisieArtistique';
  src: url('FantaisieArtistique.ttf') format('truetype');
}
@font-face {
  font-family: 'NotoSans';
  src: url('NotoSans-Medium.ttf') format('truetype');
}

@font-face {
  font-family: "crimson-italic";
  src url('crimson-italic.ttf') format('truetype');
}

#text {
  display: none;
  width: 400px;
  height: 100px;
  resize: vertical;
}

.canvas-container {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1030px;
  height: 1397px;
}

#previewCanvas {
  position: relative;
  top: 0;
  left: 0;
  width: 45%;
}

body {
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

html, body {
  font-size: 16px;
  width: 100vw;
  min-height: 100vh;
  overflow: auto;
  overflow-x: hidden;
}

#cardCanvasBackground {
  z-index: 1;
}
#cardCanvasImage {
  z-index: 2;
}
#cardCanvasText {
  z-index: 3;
}

.invisible-space {
  display: block;
  width: 100%;
}

#ui-wrapper {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

#main-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1400px;
  margin-top: 20px;
  gap: 20px;
  overflow-x: hidden;
}

.left-column, .right-column {
  flex: 1;
  max-width: 50%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
}

.aoe-cell {
  width: 45px;
  height: 45px;
  background: #eee;
  border: 1px solid #ccc;
  position: relative;
}

.aoe-toggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  background: #ddd;
  border: 1px solid #aaa;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.aoe-toggle.active {
  background: #66cc66;
  color: #000;
}

.caster-circle {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border: 2px solid #333;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

.caster-circle.filled {
  background: #333;
}

#aoeGridContainer {
  display: grid;
  grid-template-columns: repeat(5, 45px);
  grid-template-rows: repeat(5, 45px);
  gap: 4px;
}

/* Add these styles to style.css */

/* Plus button (upper right) */
.aoe-plus {
  position: absolute;
  top: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: #ddd;
  border: 1px solid #aaa;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

/* Minus button (lower right) */
.aoe-minus {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: #ddd;
  border: 1px solid #aaa;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

/* Damage display (center, low opacity) */
.aoe-damage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  opacity: 0.5;
  z-index: 10;
  pointer-events: none;
  color: #000; /* Adjust color as needed */
}
