/* ========================================================
   SLIMEOW FILES — MINIMALIST MONOCHROME THEME (slimeow.work.gd)
   ======================================================== */

:root {
  --bg-black: #000000;
  --bg-card: #0a0a0a;
  --bg-elevated: #111111;
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(255, 255, 255, 0.4);
  --text-white: #ffffff;
  --text-muted: #737373;
  --text-dark: #3a3a3a;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body.dark-theme {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  user-select: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.modal-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
}

.modal-link {
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
  font-family: var(--font-mono);
  font-size: 11px;
}

.modal-link:hover {
  color: var(--text-white);
}

/* App Container */
.app-container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-white);
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.85;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-white);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

/* Circle Action Buttons (matching slimeow.work.gd corner buttons) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-circle:hover {
  background: var(--text-white);
  color: var(--bg-black);
  border-color: var(--text-white);
  transform: scale(1.08);
}

.btn-circle:active {
  transform: scale(0.92);
}

.nav-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--text-white);
  color: var(--bg-black);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 8px;
  min-width: 14px;
  text-align: center;
  pointer-events: none;
}

.auth-status-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #555555;
  transition: background 0.3s ease;
}

.auth-status-dot.active {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 40px 0;
}

/* Monolithic Drop Frame */
.drop-frame {
  position: relative;
  width: 100%;
  min-height: 260px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.drop-frame:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-2px);
}

.drop-frame.drag-over {
  border-color: var(--text-white);
  border-style: solid;
  background: rgba(255, 255, 255, 0.06);
  transform: scale(1.02);
}

.drop-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.drop-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  transition: all 0.25s ease;
}

.drop-frame:hover .drop-icon-ring {
  border-color: var(--text-white);
  transform: scale(1.08);
}

.drop-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.drop-frame:hover .drop-hint {
  color: var(--text-white);
}

.file-input-hidden {
  display: none;
}

/* TTL Bar */
.ttl-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.ttl-icon-wrap {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.ttl-pills {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.ttl-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ttl-pill:hover {
  color: var(--text-white);
}

.ttl-pill.active {
  background: var(--text-white);
  color: var(--bg-black);
  font-weight: 800;
}

/* Code Download Bar */
.code-download-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 0;
  max-width: 480px;
  width: 100%;
}

.code-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.code-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.code-input-wrap input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 10px 16px 10px 38px;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.code-input-wrap input:focus {
  border-color: var(--text-white);
  box-shadow: 0 0 0 1px var(--text-white);
  background: #000000;
}

.code-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--font-mono);
  font-size: 12px;
}

.btn-download-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text-white);
  color: var(--bg-black);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.btn-download-action:hover {
  background: #e6e6e6;
  transform: scale(1.04);
}

.btn-download-action:active {
  transform: scale(0.96);
}

.btn-download-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 540px) {
  .code-download-bar {
    flex-direction: column;
    gap: 8px;
  }
  .code-input-wrap {
    width: 100%;
  }
  .btn-download-action {
    width: 100%;
    justify-content: center;
    padding: 12px;
  }
}

/* Progress Box */
.progress-box {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-card);
}

.progress-box.hidden {
  display: none;
}

.progress-meta-row,
.progress-stats-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
}

.uploading-filename {
  color: var(--text-white);
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploading-percent {
  color: var(--text-white);
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 10px 0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--text-white);
  transition: width 0.1s linear;
}

.progress-stats-row {
  color: var(--text-muted);
  font-size: 11px;
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title-clean {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-white);
}

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

/* Inputs & Action Buttons */
.mono-input {
  flex: 1;
  background: #000000;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--text-white);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.mono-input:focus {
  border-color: var(--border-focus);
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.btn-action {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--text-white);
  color: var(--bg-black);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-action:hover {
  transform: scale(1.1);
}

.btn-action:active {
  transform: scale(0.92);
}

.btn-pill {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-white);
  border-radius: 999px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-pill:hover {
  background: var(--text-white);
  color: var(--bg-black);
}

/* Result Modal Specifics */
.result-preview {
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border: 1px solid var(--border-subtle);
}

.result-preview img,
.result-preview video {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.result-info {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 18px;
}

.modal-bottom {
  margin-top: 8px;
}

/* My Files Modal Specifics */
.my-files-card {
  max-width: 540px;
}

.files-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.files-list::-webkit-scrollbar {
  width: 4px;
}
.files-list::-webkit-scrollbar-track {
  background: transparent;
}
.files-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  transition: background 0.18s ease;
}

.file-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.file-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 72%;
}

.file-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.file-details {
  overflow: hidden;
}

.file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-subtext {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.file-row-actions {
  display: flex;
  gap: 6px;
}

.file-row-actions .btn-circle {
  width: 30px;
  height: 30px;
}

.btn-delete:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Auth Modal Specifics */
.auth-alert {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 10px;
  text-align: center;
}

.auth-alert.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.auth-alert.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--text-white);
}

.auth-tab.active {
  background: var(--text-white);
  color: var(--bg-black);
}

/* Auth Forms */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-input {
  width: 100%;
}

.btn-full {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  background: var(--text-white);
  color: var(--bg-black);
  border: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-full:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-full:active {
  transform: translateY(0);
}

.btn-danger {
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #ef4444;
  color: #ef4444;
}

/* Auth Profile View */
.auth-profile {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-white);
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
}

.profile-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 4px;
  padding: 1px 6px;
  width: fit-content;
}

.profile-token-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Footer */
.app-footer {
  text-align: center;
  padding-top: 20px;
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #111111;
  color: var(--text-white);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 540px) {
  .app-container {
    padding: 20px 14px;
  }
  .drop-frame {
    min-height: 220px;
  }
}
