.input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 20px 0;
  padding: 12px 20px;
  font-size: 16px;
  border: none;
  outline: none;
  border-radius: 9999px;
  color: #d6b23cff;                         /* default dark-mode text */
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 2px 5px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

/* DAY MODE (default) – placeholder */
.input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

/* DARK MODE – placeholder */
body.dark-mode .input::placeholder {
  color: rgba(212, 183, 53, 0.5);
}

/* -------------------------------------------------------------
   INPUT TEXT COLOUR – handled by JS, but we also keep a CSS fallback
   ------------------------------------------------------------- */
body.dark-mode .input {
  color: #fff;
}
body:not(.dark-mode) .input {
  color: #111;        /* day-mode text (fallback) */
}

/* -------------------------------------------------------------
   FOCUS STYLE (unchanged)
   ------------------------------------------------------------- */
.input:focus {
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 1px 1px 6px rgba(255, 255, 255, 0.3),
              0 0 8px rgba(37, 117, 252, 0.5);
}

/* -------------------------------------------------------------
   THE REST OF YOUR ORIGINAL CSS (unchanged)
   ------------------------------------------------------------- */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 10px;
    background-color: #f4f4f9; 
    color: #333; 
    transition: background-color 0.3s, color 0.3s; 
}
.container { 
    width: 100%;
    max-width: 1200px; 
    margin: 10px auto; 
    background: #fff; 
    padding: 15px;
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    transition: background-color 0.3s, box-shadow 0.3s; 
}
/* -------------------------------------------------------------
   RAINBOW GRADIENT TITLE – animated & dark-mode friendly
   ------------------------------------------------------------- */
h1 {
  /* 1. Base styles */
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 20px;
  font-weight: 700;

  /* 2. Rainbow gradient (animated) */
  background: linear-gradient(
    90deg,
    #ff0000, #ff7f00, #ffff00, #00ff00,
    #0000ff, #8b00ff, #ff00ff, #ff0000
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  /* 3. Animation */
  animation: rainbow 8s ease infinite;
}

/* Dark mode: slightly brighter rainbow for contrast */
body.dark-mode h1 {
  background: linear-gradient(
    90deg,
    #ff3333, #ff9933, #ffff66, #33ff33,
    #3399ff, #cc66ff, #ff66cc, #ff3333
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: rainbow 8s ease infinite;
}

/* Rainbow animation keyframes */
@keyframes rainbow {
  0%, 100%   { background-position: 0% 50%; }
  50%        { background-position: 100% 50%; }
}
h2 { color: #555; font-size: 1.2em; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 15px; }

.input-section, .filter-section { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    padding: 15px; 
    border: 1px solid #e0e0e0; 
    border-radius: 6px; 
}

button { 
    padding: 10px 15px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 1em; 
    transition: background-color 0.2s, transform 0.1s;
}
button:hover {
    transform: translateY(-1px);
}
button#add-link { background-color: #007bff; color: white; }
button#add-link:hover { background-color: #0056b3; }

.top-controls { 
    display: flex; 
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px; 
    margin-bottom: 15px; 
    position: sticky;
    top: 10px;
    z-index: 10;
    background: inherit;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.data-management {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}
.data-management button {
    flex-grow: 1; 
}

.fire-container {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.fire-container:hover {
    opacity: 1;
}
.theme-switch {
    flex-shrink: 0;
    --toggle-size: 18px;
}
    
.link-item { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    padding: 12px; 
    margin-bottom: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s, transform 0.2s;
}
.link-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.link-details { 
    width: 100%;
    margin-bottom: 8px; 
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.link-domain { font-size: 0.8em; color: #777; margin-bottom: 2px; }
.link-url { font-size: 0.9em; display: block; margin-bottom: 4px; color: #0056b3; text-decoration: none; transition: color 0.2s; }
.link-url:hover { color: #004085; text-decoration: underline; }
.link-description { font-size: 0.85em; margin: 0 0 5px 0; }

.link-tags { margin-top: 5px; }
.tag { display: inline-block; background-color: #e9ecef; color: #555; padding: 3px 8px; margin: 3px 4px 3px 0; border-radius: 15px; font-size: 0.7em; cursor: pointer; transition: background-color 0.2s, transform 0.1s; }
.tag:hover { background-color: #dee2e6; transform: translateY(-1px); }

.link-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end; 
    gap: 8px;
    align-items: center;
}
.edit-btn { 
    background-color: #ffc107; 
    color: #212529; 
    padding: 6px 9px;
    font-size: 0.8em; 
}
.edit-btn:hover { 
    background-color: #e0a800; 
}
.remove-btn { 
    background-color: #dc3545; 
    color: white; 
    padding: 6px 9px;
    font-size: 0.8em; 
}
.remove-btn:hover { background-color: #c82333; }

.Btn {
    /* Define initial/Default Day Mode colors (using variables) */
    --btn-bg: #f0f0f0;
    --btn-text: #8b00ff;
    --btn-effect: #9f35f7ff;
    --btn-shadow: rgba(155, 93, 236, 0.7);

    /* Original Static Styles (Use variables for colors) */
    width: 80px;
    height: 32px;
    background-color: var(--btn-bg); /* Use variable */
    border: none;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    transition-duration: .5s;
    font-size: 0.85em;
}

/* Dark Mode Overrides (Change variables back to the original dark theme colors) */
body.dark-mode .Btn {
    --btn-bg: rgb(65, 64, 64);
    --btn-text: rgb(184, 236, 104);
    --btn-effect: rgb(184, 236, 104);
    --btn-shadow: rgb(184, 236, 104);
    
    background-color: var(--btn-bg);
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.342);
}

.Btn .text {
    color: var(--btn-text);
    font-weight: 800;
    letter-spacing: 1.1px;
    z-index: 2;
    font-family: "Metamorphous", serif;
    font-weight: 400;
    font-style: normal;
}
.Btn .svgIcon {
    z-index: 2;
    width: 1.1em;
    height: 1.1em;
}
.Btn .svgIcon path {
    fill: var(--btn-text);
}
.Btn .effect {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--btn-effect);
    border-radius: 50%;
    z-index: 1;
    opacity: 0;
    transition-duration: .5s;
}
.Btn:hover .effect {
    transform: scale(50); /* Maintain the fix for mobile responsiveness */
    transform-origin: center;
    opacity: 1;
    transition-duration: .5s;
}

/* Hover Styling */
.Btn:hover {
    box-shadow: 0px 0px 4px var(--btn-shadow),
                0px 0px 8px var(--btn-shadow),
                0px 0px 20px var(--btn-shadow);
    transition-duration: .7s;
}

.Btn:hover .text {
    color: var(--btn-bg); /* Text color changes to the background color on hover */
}
.Btn:hover .svgIcon path {
    fill: var(--btn-bg); /* Icon color changes to the background color on hover */
}
.controls { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    align-items: flex-start;
}
.controls > div {
    width: 100%;
}
.sort-pagination-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    gap: 10px;
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}
.pagination-controls button {
    padding: 8px 12px;
    font-size: 0.9em;
    min-width: 40px;
}
@import url('https://fonts.googleapis.com/css2?family=Metamorphous&display=swap');

h1 {
  font-family: "Metamorphous", serif;
  font-weight: 400;
  font-style: normal;
}

/* -------------------------------------------------------------
   MOBILE PAGINATION – top left, bottom centre
   ------------------------------------------------------------- */
@media (max-width: 767px) {
  /* TOP pagination (above the list) */
  #top-pagination-controls {
    justify-content: flex-start !important;   /* left-aligned */
    margin-left: 0;
  }

  /* BOTTOM pagination (below the list) */
  #bottom-pagination-controls {
    justify-content: center !important;       /* centred */
  }

  /* Make the wrapper stretch full-width so centre works */
  .sort-pagination-wrapper {
    justify-content: space-between !important;
  }
}

#empty-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    display: block;
    transition: color 0.3s;
}

#link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
    flex-direction: column;
    gap: 10px;
}
body.dark-mode .loading-overlay { background: rgba(18,18,18,0.8); }
.loading-container {
    --uib-size: 40px;
    --uib-color: #007bff;
    --uib-speed: 1.4s;
    --uib-bg-opacity: .1;
    height: var(--uib-size);
    width: var(--uib-size);
    transform-origin: center;
    overflow: visible;
}
body.dark-mode .loading-container { --uib-color: #8ab4f8; }
.car {
    fill: none;
    stroke: var(--uib-color);
    stroke-dasharray: 15, 85;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    animation: travel var(--uib-speed) linear infinite;
    will-change: stroke-dasharray, stroke-dashoffset;
    transition: stroke 0.5s ease;
}
.track {
    stroke: var(--uib-color);
    opacity: var(--uib-bg-opacity);
    transition: stroke 0.5s ease;
}
@keyframes travel {
    0% {
      stroke-dashoffset: 0;
    }
    100% {
      stroke-dashoffset: -100;
    }
}
body.dark-mode { background-color: #121212; color: #e0e0e0; }
body.dark-mode .container { background: #1e1e1e; box-shadow: 0 8px 25px rgba(255,255,255,0.1); }
body.dark-mode h2 { color: #ccc; border-bottom-color: #333; }
body.dark-mode .input-section, body.dark-mode .filter-section { border-color: #333; }
body.dark-mode input, body.dark-mode textarea, body.dark-mode select { background-color: #333; color: #fff; border: 1px solid #555; }
body.dark-mode input:focus, body.dark-mode textarea:focus, body.dark-mode select:focus {
    border-color: #8ab4f8;
    box-shadow: 0 0 0 2px rgba(138,180,248,0.25);
}
body.dark-mode .link-item { background-color: #2a2a2a; border-color: #333; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
body.dark-mode .link-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
body.dark-mode .link-url { color: #8ab4f8; }
body.dark-mode .link-description, body.dark-mode .link-domain { color: #ccc; }
body.dark-mode .tag { background-color: #444; color: #ddd; }
body.dark-mode .tag:hover { background-color: #555; }
body.dark-mode button#add-link { background-color: #5d9cec; }
body.dark-mode button#add-link:hover { background-color: #4a8fd8; }
body.dark-mode #empty-message { color: #999; }
body.dark-mode .top-controls { box-shadow: 0 2px 4px rgba(0,0,0,0.3); background: #1e1e1e; }
body.dark-mode .loading-overlay { background: rgba(18,18,18,0.8); }
body.dark-mode .edit-btn { background-color: #e0a800; color: #212529; }
body.dark-mode .edit-btn:hover { background-color: #d39e00; }

/* -------------------------------------------------------------
   MEDIA QUERIES (unchanged)
   ------------------------------------------------------------- */
@media (min-width: 768px) {
    body { padding: 20px; }
    .container { 
        padding: 25px;
        margin: 20px auto;
    }
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.4em; }
    .top-controls { 
        gap: 15px;
    }
    .data-management button {
        margin-left: 8px !important;
        flex-grow: 0;
    }
    .controls { 
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
    }
    .controls > div { 
        width: auto;
    }
    .sort-pagination-wrapper {
        flex: 1;
        justify-content: flex-end;
        gap: 20px;
    }
    .link-item { 
        flex-direction: row;
        align-items: center; 
        justify-content: space-between; 
    }
    .link-details { 
        width: 70%; 
        margin-right: 20px;
        margin-bottom: 0;
    }
    .link-url { font-size: 1em; }
    .link-description { font-size: 0.9em; }
    .link-actions {
        width: 30%; 
        justify-content: flex-end;
        gap: 10px;
    }
    .link-actions button { 
        font-size: 1em; 
        padding: 10px 15px;
    }
}

@media (max-width: 767px) {
    .top-controls {
        gap: 5px;
        padding: 8px;
    }
    .fire-container {
        width: 32px;
        height: 32px;
    }
    .Btn {
        width: 100%;
        height: 38px;
        font-size: 1em;
        border-radius: 6px;
    }
    .Btn .svgIcon {
        width: 1.3em;
        height: 1.3em;
    }
    .link-actions {
        gap: 6px;
        margin-top: 8px;
    }
    .edit-btn, .remove-btn {
        flex: 1;
        font-size: 0.85em;
        padding: 8px 10px;
    }
}

/* -------------------------------------------------------------
   THEME SWITCH (unchanged)
   ------------------------------------------------------------- */
.theme-switch {
  --toggle-size: 18px;
  --container-width: 4.5em;
  --container-height: 2em;
  --container-radius: 5em;
  --container-light-bg: #3D7EAE;
  --container-night-bg: #1D1F2C;
  --circle-container-diameter: 2.7em;
  --sun-moon-diameter: 1.7em;
  --sun-bg: #ECCA2F;
  --moon-bg: #C4C9D1;
  --spot-color: #959DB1;
  --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
  --stars-color: #fff;
  --clouds-color: #F3FDFF;
  --back-clouds-color: #AACADF;
  --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
  --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
}
.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-size: var(--toggle-size);
}
.theme-switch__container {
  width: var(--container-width);
  height: var(--container-height);
  background-color: var(--container-light-bg);
  border-radius: var(--container-radius);
  overflow: hidden;
  cursor: pointer;
  -webkit-box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  box-shadow: 0em -0.062em 0.062em rgba(0, 0, 0, 0.25), 0em 0.062em 0.125em rgba(255, 255, 255, 0.94);
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
}
.theme-switch__container::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  -webkit-box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0em 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
  border-radius: var(--container-radius)
}
.theme-switch__checkbox {
  display: none;
}
.theme-switch__circle-container {
  width: var(--circle-container-diameter);
  height: var(--circle-container-diameter);
  background-color: rgba(255, 255, 255, 0.1);
  position: absolute;
  left: var(--circle-container-offset);
  top: var(--circle-container-offset);
  border-radius: var(--container-radius);
  -webkit-box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transition: var(--circle-transition);
  -o-transition: var(--circle-transition);
  transition: var(--circle-transition);
  pointer-events: none;
}
.theme-switch__sun-moon-container {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  width: var(--sun-moon-diameter);
  height: var(--sun-moon-diameter);
  margin: auto;
  border-radius: var(--container-radius);
  background-color: var(--sun-bg);
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #a1872a inset;
  -webkit-filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
  overflow: hidden;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
}
.theme-switch__moon {
  -webkit-transform: translateX(100%);
  -ms-transform: translateX(100%);
  transform: translateX(100%);
  width: 100%;
  height: 100%;
  background-color: var(--moon-bg);
  border-radius: inherit;
  -webkit-box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset, 0em -0.062em 0.062em 0em #969696 inset;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
  position: relative;
}
.theme-switch__spot {
  position: absolute;
  top: 0.6em;
  left: 0.25em;
  width: 0.6em;
  height: 0.6em;
  border-radius: var(--container-radius);
  background-color: var(--spot-color);
  -webkit-box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
  box-shadow: 0em 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}
.theme-switch__spot:nth-of-type(2) {
  width: 0.3em;
  height: 0.3em;
  top: 0.75em;
  left: 1.1em;
}
.theme-switch__spot:nth-last-of-type(3) {
  width: 0.2em;
  height: 0.2em;
  top: 0.25em;
  left: 0.65em;
}
.theme-switch__clouds {
  width: 1em;
  height: 1em;
  background-color: var(--clouds-color);
  border-radius: var(--container-radius);
  position: absolute;
  bottom: -0.5em;
  left: 0.25em;
  -webkit-box-shadow: 0.75em 0.25em var(--clouds-color), -0.25em -0.25em var(--back-clouds-color), 1.15em 0.3em var(--clouds-color), 0.4em -0.1em var(--back-clouds-color), 1.75em 0 var(--clouds-color), 1em -0.05em var(--back-clouds-color), 2.35em 0.25em var(--clouds-color), 1.6em -0.25em var(--back-clouds-color), 2.9em -0.05em var(--clouds-color), 2.1em 0em var(--back-clouds-color), 3.6em -0.25em var(--clouds-color), 2.7em -0.35em var(--back-clouds-color), 3.7em -1.4em 0 0.35em var(--clouds-color), 3.2em -0.5em var(--back-clouds-color), 3.3em -1.7em 0 0.35em var(--clouds-color);
  box-shadow: 0.75em 0.25em var(--clouds-color), -0.25em -0.25em var(--back-clouds-color), 1.15em 0.3em var(--clouds-color), 0.4em -0.1em var(--back-clouds-color), 1.75em 0 var(--clouds-color), 1em -0.05em var(--back-clouds-color), 2.35em 0.25em var(--clouds-color), 1.6em -0.25em var(--back-clouds-color), 2.9em -0.05em var(--clouds-color), 2.1em 0em var(--back-clouds-color), 3.6em -0.25em var(--clouds-color), 2.7em -0.35em var(--back-clouds-color), 3.7em -1.4em 0 0.35em var(--clouds-color), 3.2em -0.5em var(--back-clouds-color), 3.3em -1.7em 0 0.35em var(--clouds-color);
  -webkit-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  -o-transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
  transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}
.theme-switch__stars-container {
  position: absolute;
  color: var(--stars-color);
  top: -100%;
  left: 0.25em;
  width: 2.2em;
  height: auto;
  -webkit-transition: var(--transition);
  -o-transition: var(--transition);
  transition: var(--transition);
}
.theme-switch__checkbox:checked + .theme-switch__container {
  background-color: var(--container-night-bg);
}
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
  left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container:hover {
  left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.15em)
}
.theme-switch__circle-container:hover {
  left: calc(var(--circle-container-offset) + 0.15em);
}
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
  -webkit-transform: translate(0);
  -ms-transform: translate(0);
  transform: translate(0);
}
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
  bottom: -3.25em;
}
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
}

/* -------------------------------------------------------------
   FIRE ANIMATION, 3D BUTTONS, etc. (unchanged)
   ------------------------------------------------------------- */
@keyframes scaleUpDown {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  50%, 90% { transform: scaleY(1.1); }
  75% { transform: scaleY(0.95); }
  80% { transform: scaleX(0.95); }
}
@keyframes shake {
  0%, 100% { transform: skewX(0) scale(1); }
  50% { transform: skewX(5deg) scale(0.9); }
}
@keyframes particleUp {
  0% { opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; top: -100%; transform: scale(0.5); }
}

@keyframes glow {
  0%, 100% {
    background-color: #ef5a00;
  }
  50% {
    background-color: #ff7800;
  }
}
.fire {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: transparent;
}
.fire-center {
  position: absolute;
  height: 100%;
  width: 100%;
  animation: scaleUpDown 3s ease-out infinite;
}
.fire-center .main-fire {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(farthest-corner at 10px 0, #d43300 0%, #ef5a00 95%);
  transform: scaleX(0.8) rotate(45deg);
  border-radius: 0 40% 60% 40%;
  filter: drop-shadow(0 0 10px #d43322);
}
.fire-center .particle-fire {
  position: absolute;
  top: 60%;
  left: 45%;
  width: 10px;
  height: 10px;
  background-color: #ef5a00;
  border-radius: 50%;
  filter: drop-shadow(0 0 10px #d43322);
  animation: particleUp 2s ease-out 0s infinite;
}
.fire-right {
  height: 100%;
  width: 100%;
  position: absolute;
  animation: shake 2s ease-out 0s infinite;
}
.fire-right .main-fire {
  position: absolute;
  top: 15%;
  right: -25%;
  width: 80%;
  height: 80%;
  background-color: #ef5a00;
  transform: scaleX(0.8) rotate(45deg);
  border-radius: 0 40% 60% 40%;
  filter: drop-shadow(0 0 10px #d43322);
}
.fire-right .particle-fire {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 15px;
  height: 15px;
  background-color: #ef5a00;
  transform: scaleX(0.8) rotate(45deg);
  border-radius: 50%;
  filter: drop-shadow(0 0 10px #d43322);
  animation: particleUp 2s ease-out 0s infinite;
}
.fire-left {
  position: absolute;
  height: 100%;
  width: 100%;
  animation: shake 3s ease-out 0s infinite;
}
.fire-left .main-fire {
  position: absolute;
  top: 15%;
  left: -20%;
  width: 80%;
  height: 80%;
  background-color: #ef5a00;
  transform: scaleX(0.8) rotate(45deg);
  border-radius: 0 40% 60% 40%;
  filter: drop-shadow(0 0 10px #d43322);
}
.fire-left .particle-fire {
  position: absolute;
  top: 10%;
  left: 20%;
  width: 10%;
  height: 10%;
  background-color: #ef5a00;
  border-radius: 50%;
  filter: drop-shadow(0 0 10px #d43322);
  animation: particleUp 3s infinite ease-out 0s;
}
.fire-bottom .main-fire {
  position: absolute;
  top: 30%;
  left: 20%;
  width: 75%;
  height: 75%;
  background-color: #ff7800;
  transform: scaleX(0.8) rotate(45deg);
  border-radius: 0 40% 100% 40%;
  filter: blur(10px);
  animation: glow 2s ease-out 0s infinite;
}

.button-container {
  display: flex;
  justify-content: center;
  margin: 20px;
}
.button-3d {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  border-width: 0;
  padding: 0 4px;
  min-width: 2em;
  min-height: 2em;
  box-sizing: border-box;
  background: transparent;
  font: inherit;
  cursor: pointer;
  margin: 5px;
  border-radius: 10px;
}
.button-3d:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.button-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  padding: 4px 8px;
  transform: translateY(0);
  color: #fff;
  background-image: linear-gradient(145deg, #a759faff, #d9e4f7ff);
  text-shadow: 0 -1px rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  transition: transform 0.3s, border-radius 0.3s, background 10s;
}
.button-3d:active .button-top {
  border-radius: 5px 5px 4px 4px / 4px;
  transform: translateY(1px);
  background-image: linear-gradient(145deg, #d9e4f7ff, #6a11cb);
}
.button-bottom {
  position: absolute;
  z-index: 1;
  bottom: 4px;
  left: 4px;
  border-radius: 10px;
  padding-top: 3px;
  width: calc(100% - 8px);
  height: calc(100% - 10px);
  background-image: linear-gradient(145deg, #d9e4f7ff, #6a11cb);
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.5);
  transition: border-radius 0.2s, padding-top 0.2s;
}
.button-base {
  position: absolute;
  z-index: 0;
  top: 2px;
  left: 0;
  border-radius: 10px;
  width: 100%;
  height: calc(100% - 2px);
  background-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 0.5px 0.5px 0 rgba(255, 255, 255, 0.75),
    inset 0 1px 1px rgba(0, 0, 0, 0.25);
  transition: border-radius 0.2s, padding-top 0.2s;
}
.button-3d:active .button-bottom {
  border-radius: 5px 5px 4px 4px / 4px;
  padding-top: 0;
}
.button-3d:active .button-base {
  border-radius: 5px 5px 4px 4px / 4px;
}

body.dark-mode .button-top {
  background-image: linear-gradient(145deg, #2575fc, #6a11cb);
}
body.dark-mode .button-3d:active .button-top {
  background-image: linear-gradient(145deg, #6a11cb, #2575fc);
}
body.dark-mode .button-bottom {
  background-image: linear-gradient(145deg, #6a11cb, #2575fc);
}