/* --- Home --- */
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://fonts.googleapis.com/css2?family=Francois+One&display=swap');

/* AJAX Loader */
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* --- Default Stuff --- */
html { user-select: none; }

body {
  cursor: default;
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
  color: var(--text, #111);
  
}

.if-beta { display: flex; gap: 10px; }

.hide { display: none !important }

* {
  scrollbar-width: thin; /* For Firefox */
  scrollbar-color: var(--sidebar, #888) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--sidebar, #888);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}


/* Context menu */
#menu {
  display: flex;
  flex-direction: column;
  padding: 1em 1em 1em 1em;
  margin: 0;
  position: fixed;
  border-radius: 4px;
  background: var(--background);
  gap: 1em;
  z-index: 7;
}

.context-menu-item {
  cursor: pointer;
  display: flex;
  gap: 10px;
}

.context-menu-item > * {
  font-size: 1.2em
}

main {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100vh;
  overflow-y: hidden;
}

hr {
  width: -webkit-fill-available;
  width: 100%;
  border-top: 1px solid var(--accent, white);
  border-bottom: none;
}

img, .attachment-preview-box { cursor: cell; }

textarea { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; }

code {
  display: block;
  color: var(--text);
  background: black;
  text-align: left;
  font-family: ui-monospace, "SFMono-Regular", "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
  padding: 1em;
  width: 100%;
  line-height: 10pt;
  resize: vertical;
  overflow-y: auto;
  word-wrap: break-word;
  user-select: text !important;
}

.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}

.material-icons {
  font-size: 32px;
  color: var(--accent);
}

.chosen {
  background: var(--accent) !important;
}

.chosen .material-icons { color: var(--text);}

.tag {
  cursor: alias;
  color: var(--link);
  padding-bottom: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-right: 0;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.logo-text {
  font-family: 'Francois One', 'Verdana', serif;
  font-size: 1.15em;
  font-weight: 700;
  color: var(--accent, #4f8cff);
  margin-bottom: 0;
}

.logo-subtext {
  font-family: 'Digital', monospace;
  font-size: 14px;
  font-weight: 400;
  color: var(--link, #111);
  opacity: 0.85;
  letter-spacing: 8px;
}

/* --- Theme customization --- */
.theme-select {
  padding: 6px 24px 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--accent, #4f8cff);
  background: var(--sidebar, #f7f7f7);
  color: var(--sidebarText, #111);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border 0.4s, background 0.4s, color 0.4s;
  min-width: 110px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  vertical-align: middle;
}

.theme-select:focus, .theme-select:hover {
  border-color: var(--link, #4f8cff);
  background: var(--accent, #e3f2fd);
  color: var(--text, #111);
}

a, .hashtag, .trend-item {
  transition: color 0.8s;
}

.button, .hashtag, .trend-item {
  border-color: var(--accent, #4f8cff);
}

/* --- Switches like DoomScroll --- */

/* --- Toggle Switch Styles (Android-like) --- */
  .settings-toggle-switch {
      position: relative;
      display: inline-block;
      width: 40px; /* Standardized width */
      height: 24px; /* Standardized height */
      vertical-align: middle;
      user-select: none; /* Prevent text selection on the switch */
  }

  /* Hide the default checkbox input */
  .settings-toggle-switch input {
      opacity: 0;
      width: 0;
      height: 0;
  }

  /* The slider track */
  .settings-toggle-slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: var(--border-light, #dadada); /* Default off-state background */
      transition: background 0.2s ease-in-out; /* Smooth transition for background */
      border-radius: 24px; /* Makes it pill-shaped */
      box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 1px 0 rgba(255,255,255,0.7); /* Subtle inner shadow */
      outline: none; /* Remove default focus outline for custom styling */
  }

  /* The circular handle/thumb */
  .settings-toggle-slider::before {
      content: "";
      position: absolute;
      height: 20px; /* Height of the handle */
      width: 20px;  /* Width of the handle */
      left: 2px;    /* Initial left position (2px from edge) */
      bottom: 2px;  /* Initial bottom position (2px from edge) */
      background: var(--background, #ffffff); /* Handle color */
      transition: transform 0.2s ease-in-out, background 0.2s ease-in-out; /* Smooth transition for movement and color */
      border-radius: 50%; /* Makes it circular */
      box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.15); /* Shadow for depth */
  }

  /* When the input is checked (switch is ON) */
  .settings-toggle-switch input:checked + .settings-toggle-slider {
      /* Vibrant gradient for the ON state background */
      background: linear-gradient(90deg, var(--accent, #4CAF50) 0%, var(--link, #66BB6A) 100%);
      box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 1px 0 rgba(255,255,255,0.7); /* Maintain shadow */
  }

  /* Move the handle when the switch is ON */
  .settings-toggle-switch input:checked + .settings-toggle-slider::before {
      transform: translateX(16px); /* 40px width - 20px handle - 2px left - 2px right = 16px */
      background: var(--background, #ffffff); /* Ensure handle color remains white on checked state */
  }

  /* Focus style for accessibility */
  .settings-toggle-switch input:focus + .settings-toggle-slider {
      box-shadow: 0 0 0 3px var(--accent, #4CAF50), 0 0 0 6px rgba(76, 175, 80, 0.3); /* Custom focus ring */
  }








/* --- Mobile header and footer --- */
/* Header */
.mobile-header-nav {
  padding: 5px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  z-index: 4;
  align-items: center;
  display: none;
}

.mobile-header-center {
  flex: 1;
  justify-content: center;
  align-items: center;
}

.mh-hamburger {
  background: none;
  border: none;
  color: var(--text, #222);
  margin: 0 1em;
  cursor: pointer;
  position: absolute;
  right: 0;
}

/* Footer */
.mobile-footer-nav {
  position: fixed;
  bottom: 0;
  width: 100vw;
  background: var(--sidebar, #fff);
  z-index: 4;
  display: none;
  border-top: 1px solid var(--accent, #e3e8f0);
  align-items: center;
}

.mfn-icon {
  background: none;
  border: none;
  color: var(--text, #222);
  font-size: 1.7rem;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  cursor: pointer;
  transition: color 0.2s;
  border-radius: 8px;
}

.mfn-icon.create {
  background: linear-gradient(90deg, var(--link, #e13bf0) 20%, var(--accent, #6ee7b7) 40%, var(--sidebar, #4f8cff) 100%);
  border-radius: 1em;
  padding: 8px 0;
  height: 1.8em;
}

.plus-icon {
  font-size: 2.2rem;
}

.mobile-profile-buttons {
  display: flex;
  align-items: center;
}

.mobile-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  font-size: 0.98em;
  min-width: 0;
  max-width: 40px;
  overflow: hidden;
  height: 40px;
  width: 40px;
}

.mobile-profile img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--accent, #4f8cff);
}

.mobile-profile .display-name,
.mobile-profile .balance {
  display: none !important;
}

.mobile-profile-buttons .mobile-account-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0 2px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: var(--accent, #4f8cff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.mobile-profile-buttons .mobile-account-btn:active,
.mobile-profile-buttons .mobile-account-btn:focus {
  background: var(--sidebar, #e3f2fd);
  outline: none;
}

.mobile-profile-buttons .mobile-account-btn .material-icons {
  font-size: 2.1rem;
}

/* --- Tablet Viewport --- */
@media screen and (max-width: 1199px) and (orientation: portrait){
  .mobile-header-nav {
    display: flex;
  }

  .mobile-footer-nav {
    display: flex;
    height: 4em;
  }
}

/* --- Mobile Viewport--- */
@media screen and (max-width: 499px) and (orientation: portrait){
  .chosen {
    border-radius: 0;
  }

  body, .main {
    width: 100vw !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }
}
