:root{
    --bg: #0f1724;
    --text: #b9b9b9;
    --mute: #ffffff7e;
    --create: #22c55e;
    --load: #22c55e42;
    --muted: #ffffff10;
    --input: #ffffff1f;
    --not: #22c55e33;
    --danger: #ff2727;
}

body.light {
    --bg: #ffffff;
    --text: #181818;
    --mute: #0000007e;
    --create: #3cd875;
    --load: #3cd875cc;
    --muted: #00000010;
    --input: #0000000f;
    --not: #3cd87565;
    --danger: #ff4848;
}

button {
  background: var(--create);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37,117,252,0.12);
  transition: transform 0.3s;
  margin: 3px;
}

.delete-btn {
  background: var(--danger);
}

button:hover { 
  transform: translateY(-2px); 
}

body { 
    background: var(--bg); 
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; 
    margin-bottom: 20px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--input);
  border-radius: 12px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.03);
  margin: 20px 55px 10px 10px;
}

header h1 {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.header-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Primary header buttons */
.header-buttons button {
  background: var(--create);
  border: none;
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37,117,252,0.12);
  transition: transform 0.3s;
  margin: 0;
}

.header-buttons button:hover { 
  transform: translateY(-5px); 
}

.number {
    position: absolute;
    margin-top: 12px;
    color: var(--muted);
}

#dashboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 columns, equal width */
    gap: 10px; /* 10px space both ways */
    justify-content: center; /* center the grid */
    max-width: 1040px; /* optional: 4 cards x 150px + 3 gaps of 10px */
    margin: 0 auto; /* center the grid container on the page */
}

.char-card {
    background: var(--muted);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    text-align: center;
    margin: 0;
    width: 250px; /* fixed width to match max-width calculations */
    box-sizing: border-box; /* important so padding doesn’t break width */
    transition: 0.3s;
    color: var(--text);
}

#theme-toggle-btn{
    height: 40px;
    width: 40px;
    border-radius: 6px;
    border: none;
    background-color: var(--muted);
    color: var(--text);
    font-size: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    position: fixed;
    top: 10px;
    right: 10px;
}

#theme-toggle-btn:hover{
    transform: rotate(180deg)
}

#dashboard-add-modal {
    display: none;  /* hide by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background: var(--muted);
    padding: 20px;
    border-radius: 8px;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--muted);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
  max-width: 520px;
  margin: 48px auto;
  background: var(--bg);
  border-radius: 12px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 10px 50px rgba(2,6,23,0.7);
  position: relative;
  display: block;
  margin: auto;

}

.modal-content button {
  width: 300px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: var(--create);
  color: white;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  display: block;
  margin: auto;
  margin-top: 10px;
}

.modal-content button:hover { 
  transform: translateY(-4px); 
}

.modal-content button.secondary {
  background:transparent;
  border:1px solid rgba(255,255,255,0.04);
}

#dashboard-char-name {
    width: 300px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: var(--input);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    display: block;
    margin: auto;
    margin-top: 10px;
}

#delete-content {
    display: none;  /* hide by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    background-color: var(--muted);
}



.close {
    float: right;
    font-size: 20px;
    cursor: pointer;
}

textarea {
    width: 100%;
    height: 100px;
    margin: 10px 0;
}

input {
    width: calc(100% - 100px);
    margin-right: 10px;
}

#dashboard-type-select, #dashboard-subclass-select {
  background-color: var(--input);
  color: var(--text);
  width: 100%;
  height: 35px;
  border-radius: 10px;
  padding: 7px;
  display: block;
  margin: auto;
  border: none;
  margin-top: 10px;
}

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

h2{
    color: var(--text);
}

#delete-modal-text {
    color: var(--text);
    font-size: 17px;
    margin-bottom: 20px;
    margin-top: -5px;
}

small {
    font-weight: 600;
}

@media (max-width: 800px) {
    #dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    #dashboard {
        grid-template-columns: 1fr;
    }
}

