:root {
  --bs-body-font-family: "Inter", system-ui, sans-serif;
  --bs-body-bg: #f8f9fb;
  --bs-body-color: #1e1e1e;
  --bs-primary: #006eff;
  --bs-primary-hover: #0052cc;
  --bs-secondary: #6c757d;
  --bs-success: #00b87c;
  --bs-info: #4cb2ff;
  --bs-warning: #ffb100;
  --bs-danger: #ff4d4f;
  --bs-border-radius: 0.6rem;
  --bs-border-color: #e1e4e8;
  --bs-card-bg: #ffffff;
  --bs-card-border-color: #e5e7eb;
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-padding-x: 1.2rem;
  --bs-btn-font-weight: 500;
  --bs-link-color: var(--bs-primary);
  --bs-link-hover-color: var(--bs-primary-hover);
}
body.light {
  background: #f8f9fb;
  color: #1e1e1e;
}
body.dark {
  background: #121212;
  color: #f7f7f7;
}
.panel, .panel textarea, .panel .form-control:focus {
  background: #FFFFFF;
}
.dark .panel, .dark .panel textarea, .dark .panel .form-control:focus {
  background: #1e1e1e;
  color: #f7f7f7;
  border-color: #333333;
}
.fake-textarea {
  background-color: #f8f9fa;
  cursor: pointer;
}
.media-preview-item {
  height: 100px;
  width: auto;
  vertical-align: top;
  padding: 8px;
}
.media-preview-item img {
  max-width: 84px;
  max-height: 84px;
}

/* File Upload Previews - Generic styles for all upload contexts */

/* Image preview styles */
.file-upload-image-wrapper {
  position: relative;
  display: inline-block;
  margin: 2px;
}

.file-upload-image-wrapper.file-upload-loading {
  min-width: 150px;
  min-height: 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 4px;
}

.file-upload-image {
  max-width: 150px;
  max-height: 150px;
  display: block;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}

.file-upload-delete {
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 20px;
  font-size: 18px;
  border-radius: 0 4px 0 4px;
  z-index: 10;
}

/* Loading spinner for images */
.file-upload-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--bs-primary, #006eff);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Video preview styles */
.file-upload-video-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  margin: 4px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
}

.file-upload-video-thumbnail {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-upload-video-thumbnail .video-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.file-upload-video-thumbnail .video-info {
  flex: 1;
  min-width: 0;
}

.file-upload-video-thumbnail .video-filename {
  font-size: 12px;
  font-weight: 500;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-upload-video-thumbnail .video-status {
  font-size: 11px;
  color: #6c757d;
  margin-top: 2px;
}

.file-upload-video-thumbnail.clickable {
  cursor: pointer;
  border-radius: 4px;
  padding: 4px;
  margin: -4px;
  transition: background-color 0.2s ease;
}

.file-upload-video-thumbnail.clickable:hover {
  background-color: #f8f9fa;
}

.file-upload-video-thumbnail.clickable .video-status {
  color: #0d6efd;
  font-weight: 500;
}

.file-upload-video-progress {
  width: 100%;
}

.file-upload-delete {
  opacity: 0.8;
}

.file-upload-delete:hover {
  opacity: 1;
}

.file-upload-delete:disabled {
  opacity: 0.5;
}

.file-upload-download {
  position: absolute;
  top: 4px;
  right: 32px;
  width: 22px;
  height: 22px;
  padding: 0;
  line-height: 18px;
  font-size: 14px;
  border-radius: 3px;
  opacity: 0.8;
}

.file-upload-download:hover {
  opacity: 1;
}

.file-upload-download:disabled {
  opacity: 0.5;
}

/* Uploaded indicator */
.file-upload-image-wrapper.uploaded,
.file-upload-video-wrapper.uploaded {
  border-color: #00b87c;
  box-shadow: 0 0 0 2px rgba(0, 184, 124, 0.1);
}

.file-upload-image-wrapper.uploaded::after,
.file-upload-video-wrapper.uploaded::after {
  content: '✓';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: #00b87c;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  z-index: 11;
}

.file-upload-video-wrapper.uploaded::after {
  position: absolute;
  top: 8px;
  left: 8px;
}

/* Dark mode support */
body.dark .file-upload-video-wrapper {
  background: #1e1e1e;
  border-color: #2c2c2c;
}

body.dark .file-upload-image-wrapper.file-upload-loading {
  background: #1e1e1e;
}

body.dark .file-upload-video-thumbnail .video-filename {
  color: #f7f7f7;
}

body.dark .file-upload-video-thumbnail .video-status {
  color: #b0b0b0;
}

/* Post poster element */
.post-poster {
  display: flex;
  align-items: center;
  margin-bottom: -30px;
}
.profile-poster {
  display: flex;
  align-items: center;
}
.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 16px;
  flex-shrink: 0;
}
.profile-avatar-camera {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.profile-avatar-wrapper:hover .profile-avatar-camera {
  opacity: 1;
}

/* Avatar base styles */
.profile-poster-avatar,
.post-poster-avatar {
  background: #FFF;
  border: 8px solid #0074d9;
  cursor: pointer;
  padding: 6px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Avatar size modifiers */
.avatar-sm .profile-poster-avatar,
.avatar-sm .post-poster-avatar {
  width: 68px;
  height: 68px;
  border-width: 4px;
  padding: 3px;
}

.avatar-md .profile-poster-avatar,
.avatar-md .post-poster-avatar {
  width: 80px;
  height: 80px;
  border-width: 4px;
  padding: 3px;
}

.avatar-lg .profile-poster-avatar,
.avatar-lg .post-poster-avatar {
  width: 110px;
  height: 110px;
  border-width: 8px;
  padding: 6px;
}

.profile-poster-name {
  background: #0074d9;
  color: #FFF;
  font-weight: 700;
  font-size: 1.75rem;
  border-radius: 0.25rem;
  padding: 4px 20px 4px 24px;
  margin-left: -28px;
}
.post-poster-avatar {
  margin-right: 12px;
}
.post-poster-name {
  background: #0074d9;
  color: #FFF;
  font-weight: 600;
  font-size: 16px;
  object-fit: contain;
  border-radius: 0.25rem;
  padding: 2px 12px 2px 16px;
  margin-left: -18px;
}
.post-interior.panel {
  margin-left: 20px;
}
.post-interior img {
  max-width: 100%;
}
.post-timestamp {
  opacity: 0;
  transition: opacity 0.2s;
}
.post:hover .post-timestamp {
  opacity: 1;
}
.group-posts .post-context {
  display: none;
}
body.dark {
  --bs-body-font-family: "Inter", system-ui, sans-serif;

  /* Core colors */
  --bs-body-bg: #121212;
  --bs-body-color: #f7f7f7;
  --bs-secondary-color: #b0b0b0;
  --bs-tertiary-color: #8a8a8a;

  /* Layered surfaces */
  --bs-body-secondary-bg: #1a1a1a;
  --bs-body-tertiary-bg: #1f1f1f;

  /* Brand & utility colors */
  --bs-primary: #4c8dff;
  --bs-primary-hover: #3370e6;
  --bs-secondary: #9ca3af;
  --bs-success: #00d09c;
  --bs-info: #5ac8fa;
  --bs-warning: #ffc107;
  --bs-danger: #ff6b6b;

  /* Borders & cards */
  --bs-border-color: #2c2c2c;
  --bs-border-radius: 0.6rem;
  --bs-card-bg: #1e1e1e;
  --bs-card-border-color: #2c2c2c;

  /* Buttons & links */
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-padding-x: 1.2rem;
  --bs-btn-font-weight: 500;
  --bs-link-color: var(--bs-primary);
  --bs-link-hover-color: var(--bs-primary-hover);
}
.main-content {
  max-width: 800px;
  width: 100%;
}
.account-name {
    background: #999;
    color: #FFF;
    display: inline-block;
    padding: 3px 5px 5px;
    border-radius: 0 0 5px 5px;
    margin: 0 -5px;
}
.encrypted-message-image {
    max-width: 100%;
    max-height: 135px;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: opacity 0.2s;
}
.encrypted-message-image:hover {
    opacity: 0.9;
}
a {
  text-decoration: none;
}
.text-content {
  padding: 10px 30px;
}
.navbar-toggler {
  border: 1px solid #CCC;
  background: transparent;
  width: 30px;
  height: 30px;
  z-index: 1050;
  top: 17px;
  left: -1px;
  border-radius: 0 10px 10px 0;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 1.5rem;
  height: 1.5rem;
  display: inline-block;
  background-size: 100% 100%;
}
#linksCollapse.collapsing {
  transition: none !important;
  height: auto !important;
}
/* LINKS */
.links {
  font-size: 24px;
  line-height: 200%;
}
.legal {
  font-size: 14px;
  margin-top: 20px;
  line-height: 160%;
}

.account-area {
  position: relative;
  text-align: center;
  width: 200px;
}
.account-area .account-name {
  background: #0074d9;
  left: 25px;
  position: absolute;
  text-align: center;
  height: 64px;
  width: 160px;
}
.account-area .anime-logo {
  display: block;
  margin: 0 auto 20px;
  max-width: 150px;
  height: auto;
  top:20px;
  position: relative;
  z-index: 2;
}

@media (max-width: 991.98px) {
  #linksCollapse {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
  }
  #linksCollapse .account-area {
    margin-left: 30px;
  }
  #linksCollapse.collapse:not(.show) {
    transform: translateX(-100%);
  }
  #linksCollapse.collapse.show {
    transform: translateX(0);
  }
}

.btn-video-download {
  font-size: 20px;
  padding: 0px 10px;
  background: #0d6efd33;
  border: 0;
  border-radius: 5px;
  color: #909294;
}

.annie {
  background: url('/images/annie-sm.png');
  background-repeat: no-repeat;
  display: inline-block;
  padding-left: 60px;
}
.controller_annie .main-content {
  max-width: unset;
}

/* Utility Classes */
.opacity-25-whenunhovered {
  opacity: 0.25;
  transition: opacity 0.2s;
}
.opacity-25-whenunhovered:hover,
.opacity-25-whenunhovered:focus {
  opacity: 1 !important;
}
.form-select-sm.super-sm {
  background-position: right 0.25rem center;
  background-size: 10px 10px;
  padding-left: 2px;
  padding-right: 16px;
}