/* 
   NinjaHost Styling - Adapted from hexrays.su aesthetic
   Theme: Wine Dark with Soft Pink/Blue gradients, Comic Sans font, and Waifu docked on the LEFT
*/

:root {
  color-scheme: dark;
  --bg:     #181a1b;
  --bg2:    #1b1f22;
  --fg:     #e8e6e3;
  --muted:  #c2a0bd;
  --rule:   #5e3a4d;
  --pink:   #ff9ec9;
  --pink-d: #ff6fae;
  --blue:   #9ad4ff;
  --blue-d: #6fc1f7;
  --card:   rgba(255, 255, 255, 0.045);
  --warn:   #ff7a9c;
  --success-color: #5cb85c;
  --font-family: "Comic Sans MS", "Segoe UI", "Quicksand", ui-rounded, system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: dark;
}

body {
  background:
    radial-gradient(1300px 950px at 48% -12%, rgba(128, 46, 80, 0.42) 0%, transparent 60%),
    radial-gradient(1000px 800px at 100% 35%, rgba(70, 30, 55, 0.30) 0%, transparent 60%),
    linear-gradient(135deg, #2a1822 0%, #1a1419 55%, #141518 100%);
  background-color: var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.7;
  padding: 40px 20px 90px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.container {
  width: 95%;
  max-width: 780px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ==========================================
   WAIFU BACKGROUND DOCKED TO THE RIGHT
   ========================================== */
#waifu {
  position: fixed;
  right: 2vw; /* Docked to the right */
  bottom: 0;
  height: 92vh;
  max-width: 46vw;
  object-fit: contain;
  object-position: bottom right; /* Align image bottom-right */
  opacity: 0.22;
  z-index: 0;
  pointer-events: none;
  filter: saturate(1.05);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 22%);
          mask-image: linear-gradient(to top, transparent 0%, #000 22%);
}

@media (max-width: 640px) {
  #waifu {
    height: 70vh;
    max-width: 90vw;
    right: 0;
    opacity: 0.12;
  }
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  border-bottom: 2px dashed var(--rule);
  padding-bottom: 15px;
  margin-bottom: 25px;
}

.logo-area {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.logo-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
  color: var(--pink-d);
  text-shadow: 2px 2px 0 #0d0f10, 3px 3px 0 var(--blue);
}

.logo-subtitle {
  color: var(--muted);
  font-size: 14px;
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-greeting {
  font-size: 14px;
  color: var(--muted);
}
.user-greeting strong {
  color: var(--pink-d);
}

.nav-link {
  color: var(--blue-d);
  text-decoration: none;
  background: transparent;
  border: none;
  border-bottom: 1.5px dotted var(--blue-d);
  padding: 0 4px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.nav-link:hover {
  color: #fff;
  background: var(--pink-d);
  border-radius: 6px;
  border-bottom-color: transparent;
  text-decoration: none;
}

.nav-separator {
  color: var(--rule);
  user-select: none;
}

.nav-link.logout {
  color: var(--warn);
  border-bottom-color: var(--warn);
}
.nav-link.logout:hover {
  background: var(--warn);
  color: #fff;
}

/* ==========================================
   CARDS & COMMON UTILITIES
   ========================================== */
.card {
  background: var(--card);
  border: 2px solid var(--rule);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(255, 158, 201, 0.18);
  backdrop-filter: blur(2px);
  margin-bottom: 25px;
}

.hidden {
  display: none !important;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--pink-d);
  margin-bottom: 15px;
}
h2::before {
  content: "✿ ";
}

hr {
  border: 0;
  height: 0;
  border-top: 2px dashed var(--rule);
  margin: 22px 0;
}

/* ==========================================
   NOTIFICATION BAR
   ========================================== */
.notification {
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  backdrop-filter: blur(2px);
}

.notification.success {
  background: rgba(110, 255, 136, 0.08);
  border: 2px solid var(--success-color);
  color: #a4ffb7;
  box-shadow: 0 4px 12px rgba(110, 255, 136, 0.1);
}

.notification.error {
  background: rgba(255, 122, 156, 0.08);
  border: 2px solid var(--warn);
  color: var(--warn);
  box-shadow: 0 4px 12px rgba(255, 122, 156, 0.1);
}

/* ==========================================
   AUTH CARD
   ========================================== */
#auth-section {
  max-width: 480px;
  margin: 30px auto;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px dashed var(--rule);
  margin-bottom: 20px;
  justify-content: center;
  gap: 15px;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-family);
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  color: var(--pink-d);
  border-bottom: 2.5px solid var(--pink-d);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--pink-d);
}

input, textarea {
  background: var(--bg2);
  border: 2px solid var(--rule);
  color: var(--fg);
  padding: 10px;
  border-radius: 10px;
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: all 0.12s ease;
}

input:focus, textarea:focus {
  border-color: var(--pink-d);
  box-shadow: 0 0 8px rgba(255, 158, 201, 0.25);
}

.form-help {
  font-size: 12px;
  color: var(--muted);
}

.submit-btn {
  background: var(--rule);
  border: 2px solid var(--pink-d);
  color: #fff;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-family);
  transition: all 0.12s ease;
  box-shadow: 0 4px 10px rgba(255, 158, 201, 0.1);
}

.submit-btn:hover {
  background: var(--pink-d);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 111, 174, 0.4);
}

/* ==========================================
   DRAG AND DROP UPLOAD ZONE (Catbox File Style)
   ========================================== */
.upload-box {
  border: 3px dashed var(--rule);
  background: var(--card);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-box:hover, .upload-box.dragover {
  border-color: var(--pink-d);
  box-shadow: 0 0 20px rgba(255, 158, 201, 0.25);
  background: rgba(255, 158, 201, 0.02);
}

.upload-icon {
  font-size: 40px;
  color: var(--pink-d);
  margin-bottom: 10px;
  animation: float 2s ease-in-out infinite;
}

.upload-box h3 {
  font-size: 18px;
  color: var(--pink);
  margin-bottom: 5px;
}

/* ==========================================
   PROGRESS BAR CARD
   ========================================== */
.progress-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar-bg {
  background: var(--bg2);
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--rule);
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--pink-d), var(--blue-d));
  width: 0%;
  height: 100%;
  transition: width 0.1s linear;
}

.progress-percent {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--blue-d);
  align-self: flex-end;
}

/* ==========================================
   FILE LIST TABLE
   ========================================== */
.file-list-card {
  padding: 24px 0 10px 0; /* Remove horizontal padding for borderless table layout */
}

.file-list-card h2 {
  padding-left: 24px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.file-table th, .file-table td {
  padding: 12px 24px;
  text-align: left;
  border-bottom: 2px dashed var(--rule);
}

.file-table th {
  color: var(--pink-d);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.1);
}

.file-table td {
  font-size: 14px;
}

.file-table tr:last-child td {
  border-bottom: none;
}

.file-link {
  color: var(--blue-d);
  text-decoration: none;
  border-bottom: 1.5px dotted var(--blue-d);
  font-weight: 600;
  transition: all 0.12s ease;
}

.file-link:hover {
  color: #fff;
  background: var(--pink-d);
  border-radius: 4px;
  border-bottom-color: transparent;
}

.file-date {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: 13px;
}

.file-size {
  font-family: var(--font-mono);
  color: var(--fg);
}

.table-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  background: var(--bg2);
  color: var(--fg);
  border: 2px solid var(--rule);
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 12px;
  font-family: var(--font-family);
  transition: all 0.12s ease;
}

.action-btn:hover {
  border-color: var(--blue-d);
  color: #fff;
}

.delete-btn {
  color: var(--warn);
  border-color: var(--rule);
}

.delete-btn:hover {
  background: rgba(255, 122, 156, 0.1);
  border-color: var(--warn);
  color: #fff;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  font-style: italic;
  padding: 30px !important;
}

/* ==========================================
   THEME SETTINGS & HEADER RIGHT
   ========================================== */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

@media (max-width: 640px) {
  .header-right {
    align-items: center;
    width: 100%;
  }
}

.theme-settings {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  border: 2px dashed var(--rule);
}

.checkbox-container.mini {
  gap: 5px;
}

.checkbox-container.mini input[type="checkbox"] {
  width: 15px;
  height: 15px;
}

.checkbox-container.mini .checkbox-label {
  font-size: 12px;
}

.theme-dropdown {
  background: var(--bg2);
  border: 1px solid var(--rule);
  color: var(--fg);
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.12s ease;
}

.theme-dropdown:focus {
  border-color: var(--pink-d);
}

/* ==========================================
   ANIMATIONS & FLOAT
   ========================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0px); }
}

/* ==========================================
   UPLOAD OPTIONS & DECRYPTION STYLES
   ========================================== */
.upload-options-card {
  margin-top: 20px;
}

.checkbox-group {
  display: flex;
  gap: 25px;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--pink-d);
}

.checkbox-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--fg);
}

.decrypt-info {
  margin-bottom: 20px;
  font-size: 15px;
}

.file-info-group {
  background: var(--bg2);
  padding: 12px 18px;
  border-radius: 10px;
  border: 2px dashed var(--rule);
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
}

.download-btn {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  margin-top: 15px;
  width: auto;
  min-width: 200px;
}

#decrypt-preview-media {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
  border: 2px solid var(--rule);
}

#decrypt-preview-media img, #decrypt-preview-media video {
  max-width: 100%;
  max-height: 400px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#decrypt-preview-media audio {
  width: 100%;
  max-width: 500px;
}

.link-copy-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 5px;
}

.link-copy-wrapper input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
}

.link-copy-wrapper button {
  padding: 10px 18px;
  font-size: 13px;
}


