:root{
  --bg-page: #0f0f1b;
  --panel: #1b1b2f;
  --tabs-bg: #23233b;
  --tab-btn-top: #3a3a5c;
  --tab-btn-bottom: #2c2c4d;
  --tab-btn-hover-top: #4a4a6c;
  --tab-btn-hover-bottom: #3a3a5c;
  --input-bg: #23233b;
  --input-border: #3a3a5c;
  --accent: #3c91e6;
  --accent-darker: #337fd9;
  --muted: #888;
  --panel-border: #3a3a5c;
  --panel-alt: #23233b;
  --very-dark: hsl(0,0%,10%);
  --very-dark-hover: hsl(0,0%,13%);
  --disabled-bg-override: hsl(0,60%,24%,0.5); 
  --disabled-bg-fallback: hsla(0,0%,83%,0.5);
  --white: #ffffff;
  --light-gray: #e0e0e0;
}

* {
  box-sizing: border-box;
  user-select: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body{
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-page);
  color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#ahkTitleBar {
  -webkit-app-region: drag;
  width: 100%;
  height: 10%;
}

.container{
  width: 100%;
  height: 100%;
  background-color: var(--panel);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background-color 0.3s;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.tabs{
  display: flex;
  background-color: var(--tabs-bg);
  padding: 4px;
  padding-top: 0;
  gap: 1%;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.tabs button{
  background: linear-gradient(to bottom, var(--tab-btn-top), var(--tab-btn-bottom));
  border: none;
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
  border-radius: 6px;
  padding: 1.5% 2%;
  width: 15%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.2),
    0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
}

.tabs button:hover{
  background: linear-gradient(to bottom, var(--tab-btn-hover-top), var(--tab-btn-hover-bottom));
  transform: scale(1.05);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.3),
    0 6px 12px rgba(0,0,0,0.2);
  z-index: 2;
}

.tabs button:active{
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transform: translateY(1px) scale(1.03);
}

.tab-button-active{
  box-shadow: 0 0 0 2px var(--accent), 0 4px 8px rgba(0,0,0,0.3), 0 6px 12px rgba(60,145,230,0.2) !important;
  background: linear-gradient(to bottom, var(--tab-btn-hover-top), var(--tab-btn-top));
}

.tab{
  opacity: 0;
  visibility: hidden;
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scale(0.95);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tab.active{
  opacity: 1;
  visibility: visible;
  position: relative;
  transform: scale(1);
  animation: tabPopIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding-block: 0;
}

@keyframes tabPopIn{
  0% { transform: scale(0.95); opacity: 0; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); }
}

.tab button {
  width: 100%;
}

button:disabled{
  background: var(--disabled-bg-override) !important;
  display: none;
  background-color: var(--disabled-bg-fallback);
}

input:disabled{
  background-color: var(--disabled-bg-fallback);
}

input[type="text"]{
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  color: var(--light-gray);
  font-size: 97.5%;
  transition: all 0.2s ease;
}

input[type="text"]:focus{
  outline: none;
  background-color: #2c2c4d; 
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(60,145,230,0.2);
}

label{
  font-size: 97.5%;
  display: block;
  margin-top: 1%;
  transition: color 0.2s;
}

input[type="checkbox"],
input[type="radio"]{
  margin-right: 6px;
  transform: scale(1.1);
  transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover{
  transform: scale(1.3);
}

input[type="checkbox"]{
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--panel-border);
  border-radius: 4px;
  background-color: var(--panel-alt);
  position: relative;
  cursor: pointer;
}

input[type="checkbox"]:checked{
  background-color: var(--accent);
  border-color: var(--accent);
}

input[type="checkbox"]:checked::after{
  content: "✓";
  position: absolute;
  color: white;
  font-size: 14px;
  left: 2px;
  top: -2px;
  font-weight: bold;
  font-family: 'Arial', sans-serif;
}

input[type="radio"]{
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--panel-border);
  border-radius: 50%;
  background-color: var(--panel-alt);
  position: relative;
  cursor: pointer;
}

input[type="radio"]:checked{
  background-color: var(--accent);
  border-color: var(--accent);
}

input[type="radio"]:checked::after{
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
}

.seconds-input{
  width: 110px !important;
  margin-left: 8px;
  max-width: 110px;
}

button{
  background-color: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  margin: 8px 0;
  font-size: 100%;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

button:hover{
  background-color: var(--accent-darker);
  transform: scale(1.03);
}

.donate-btn, .discord-btn{
  font-weight: bold;
  cursor: pointer;
  justify-self: flex-end;
  width: 20px;
  margin-top: 1%;
}

.donate-btn:hover, .discord-btn:hover{
  transform: scale(1.3);
}

.credits{
  color: var(--muted);
  font-size: 12px;
  margin-top: 8px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

hr{
  border: none;
  height: 1px;
  background-color: #444;
  margin: 10px 0;
  transition: background-color 0.3s;
}

.window-controls{
  display: flex;
  justify-content: flex-end;
}

.closeButton,
.minimizeButton{
  font-family: 'Monaco', monospace;
  font-weight: bold;
  background-color: var(--very-dark);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 8.5%;
  max-height: 15%;
  transition: background-color 0.2s, transform 0.2s;
  margin: 3px;
  -webkit-app-region: no-drag;
}

.window-controls button:hover{
  background-color: var(--very-dark-hover);
  transform: scale(1.05);
}

.rewards-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 2%;
}

.reward-box{
  background-color: var(--panel-alt);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  border: 1px solid var(--panel-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reward-box:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.reward-header{
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-weight: bold;
  font-size: 97.5%;
  margin-bottom: 10%;
  color: var(--light-gray);
}

.reward-options{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reward-options label{
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--light-gray);
}

.mode-section{ margin-bottom: 20px; }

h3{
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 18px;
}

.mode-box{
  background-color: var(--panel-alt);
  border-radius: 8px;
  padding: 2%;
  margin-bottom: 12px;
  border: 1px solid var(--panel-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mode-box:hover{
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.mode-box h4{
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--light-gray);
  font-size: 100%;
}

.radio-option{
  display: flex;
  align-items: center;
  margin: 6px 0;
  color: var(--light-gray);
}

.selector{
  display: flex;
  align-items: center;
  gap: 12px;
}

.selector-container{
  display: flex;
  align-items: center;
}

.tab::-webkit-scrollbar,
.custom-dropdown-options::-webkit-scrollbar{
  width: 8px;
}

.tab::-webkit-scrollbar-track,
.custom-dropdown-options::-webkit-scrollbar-track{
  background: var(--tabs-bg);
  border-radius: 4px;
}

.tab::-webkit-scrollbar-thumb,
.custom-dropdown-options::-webkit-scrollbar-thumb{
  background: var(--accent);
  border-radius: 4px;
  transition: background-color 0.2s;
}

.tab::-webkit-scrollbar-thumb:hover,
.custom-dropdown-options::-webkit-scrollbar-thumb:hover{
  background: var(--accent-darker);
}

.custom-dropdown{
  position: relative;
  width: 150px;
  background-color: #101010;
  border-radius: 6px;
  user-select: none;
  cursor: pointer;
  color: var(--white);
  transition: background-color 0.2s, color 0.2s;
  left: 3%;
}

.custom-dropdown-selected{
  padding: 6px;
  border: 1px solid #333;
  border-radius: 6px;
  transition: background-color 0.2s, border 0.2s;
}

.custom-dropdown-options{
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #1a1a1a;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  transition: max-height 0.3s ease;
}

.custom-dropdown-options div{
  padding: 6px;
  border-bottom: 1px solid #2b2b2b;
  transition: background-color 0.2s;
}

.custom-dropdown-options div:hover{
  background-color: #333;
}

.dropdown-divider{
  padding: 6px;
  font-size: 12px;
  color: #777;
  pointer-events: none;
}

.custom-dropdown-options::-webkit-scrollbar{
  width: 8px;
}
.custom-dropdown-options::-webkit-scrollbar-track{
  background: #1e1e1e;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.custom-dropdown-options::-webkit-scrollbar-thumb{
  background: #888;
  border-radius: 4px;
  transition: background-color 0.2s;
}
.custom-dropdown-options::-webkit-scrollbar-thumb:hover{
  background: #555;
}

.macrotitle{
  position: absolute;
  font-size: 20px;
  font-weight: bold;
  color: var(--white);
  user-select: none;
  margin-top: 1%;
  margin-left: 2%;
}

svg{
  stroke: currentColor;
  fill: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: stroke 0.2s;
}

.footer{
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: var(--tabs-bg);
  transition: background-color 0.3s;
}

.footer button{
  flex: 1;
  margin: 0 10px;
}
