:root {
  --bg-dark: #0f172a;
  --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.15);
  --border: rgba(255, 255, 255, 0.15);
  --text-primary: rgba(255, 255, 255, 0.95);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --accent: #38bdf8;
  --accent-rgb: 56, 189, 248;
  --accent-glow: 0 0 20px rgba(56, 189, 248, 0.5);
  --danger: #f43f5e;
  --success: #34d399;
  --warning: #fbbf24;
  --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --blur: blur(20px);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --liquid-gradient: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899);
}

.light-theme {
  --bg-dark: #dbe7f5;
  --bg-gradient: linear-gradient(135deg, #d6e4f5 0%, #e8f0ff 100%);
  --surface: rgba(249, 252, 255, 0.28);
  --surface-strong: rgba(255, 255, 255, 0.42);
  --border: rgba(203, 213, 225, 0.32);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --accent: #2563eb;
  --accent-glow: 0 0 14px rgba(37, 99, 235, 0.22);
  --glass-border: 1px solid rgba(203, 213, 225, 0.35);
  --shadow: 0 8px 26px rgba(15, 23, 42, 0.1);
  --nav-text: #334155;
  --card-bg: rgba(255, 255, 255, 0.7);
  --input-bg: rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient), radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 55%);
  color: var(--text-primary);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  position: relative;
  overflow-x: hidden;
  width: 100%;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  opacity: 0.5;
  animation: float 20s infinite alternate ease-in-out;
}


.light-theme::before,
.light-theme::after {
  display: block;
  opacity: 0.4;
  filter: blur(120px);
}

body::before {
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, #a5b4fc 0%, transparent 70%);
  top: -300px;
  left: -300px;
}

body::after {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, #f0abfc 0%, transparent 70%);
  bottom: -250px;
  right: -250px;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(50px, 50px) scale(1.1);
  }

  100% {
    transform: translate(-30px, 20px) scale(0.9);
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  grid-template-rows: 1fr;
  gap: 24px;
  padding: 32px 32px; /* restored original larger padding */
  flex: 1;
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 100px);
}

.glass-panel {
  background: var(--surface);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* AI panel header and chat frame */
.ai-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.ai-panel .ai-header {
  background: transparent;
  padding: 12px 16px; /* restored original header spacing */
}

#aiChatArea {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  border: 1px solid rgba(255,255,255,0.06); /* faint frame */
  border-radius: 14px;
  padding: 12px; /* restored original padding */
}

#aiChatArea .chat-messages .chat-message.bot {
  background: rgba(255,255,255,0.04);
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 84%;
}

#aiChatArea .chat-input-area {
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 8px;
  border-radius: 12px;
}

/* translate controls removed */

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px 0; /* restored original top padding */
  position: relative;
  z-index: 1;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 50%;

  background: linear-gradient(135deg, #10b981, #6366f1);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.search-box {
  flex: 1;
  max-width: 620px;
  position: relative;
}

.auth-btn {
  border: 1px solid rgba(69, 255, 230, 0.6);
  background: rgba(69, 255, 230, 0.2);
  color: var(--text-primary);
  border-radius: 18px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.auth-btn:hover {
  background: rgba(69, 255, 230, 0.35);
  box-shadow: 0 12px 28px rgba(69, 255, 230, 0.25);
}

.theme-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  border-radius: 50%;

  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  margin-right: 12px;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn-primary {
  background: var(--liquid-gradient);
  background-size: 200% 200%;
  animation: gradientForwards 5s infinite;
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 16px;
  font-weight: 700;
  font-family: "Sora", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary,
.sidebar-secondary-btn,
.btn-google,
.fab-menu button,
.modal-content button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-family: "Sora", sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover,
.sidebar-secondary-btn:hover,
.btn-google:hover,
.fab-menu button:hover,
.modal-content button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.65);
}

@keyframes gradientForwards {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.btn-primary:active {
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 14px;
  font-weight: 500;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.light-theme .btn-google {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .btn-google:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.search-box input {
  width: 100%;
  padding: 16px 52px 16px 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;

  background: rgba(0, 0, 0, 0.25);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;

  font-size: 15px;
  transition: all 0.3s ease;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.search-box input:focus {
  outline: none;
  border-color: rgba(69, 255, 230, 0.7);
  box-shadow: 0 0 0 2px rgba(69, 255, 230, 0.2);
}

.search-icon,
.mic-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
}

.search-icon {
  left: 20px;
}

.mic-icon {
  right: 20px;
}

.user-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;

  padding: 8px 16px;

  background: var(--surface);
  border-radius: 30px;
  border: var(--glass-border);
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
  max-width: 100%;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(69, 255, 230, 0.5);
}

.user-chip span {
  font-size: 13px;

  color: var(--text-secondary);
}

.avatar {
  width: 36px;

  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fca5a5, #fecaca);
  display: grid;
  place-items: center;
  color: #c2410c;
  font-weight: 800;
  font-size: 14px;

  flex-shrink: 0;
}

.user-chip-main {
  display: flex;
  flex-direction: column;
  text-align: left;
  align-items: flex-start;
}

.user-chip-main strong {
  font-size: 13px;

}

.user-chip-main span {
  font-size: 11px;

  color: var(--text-secondary);
}

.user-chip-actions {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.user-chip-actions button {
  border: none;
  border-radius: 10px;

  padding: 6px 12px;

  font-size: 12px;

  font-weight: 600;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.user-chip-actions button.primary {
  background: rgba(34, 211, 238, 0.2);
  color: #0891b2;
}

.user-chip-actions button:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

aside.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
}

.sidebar h2 {
  font-family: "Sora", sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.55);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, border 0.15s ease, color 0.15s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item.active,
.nav-item:hover {
  background: var(--surface-strong);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.upload-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(11, 19, 34, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.upload-card button {
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(69, 255, 230, 0.85), rgba(114, 163, 255, 0.85));
  border: none;
  color: rgba(14, 24, 46, 0.92);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.light-theme .nav-item {
  color: var(--nav-text);
}

.light-theme .nav-item:hover,
.light-theme .nav-item.active {
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent);
  border-color: rgba(0, 0, 0, 0.05);
}


.light-theme .search-box input {
  background: var(--input-bg);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-primary);
}

.light-theme .search-box input::placeholder {
  color: var(--text-secondary);
}

.light-theme .search-icon,
.light-theme .mic-icon {
  color: var(--text-secondary);
}


.light-theme .glass-panel,
.light-theme .upload-card,
.light-theme .empty-state,
.light-theme .ai-panel,
.light-theme .curation-card,
.light-theme .section-placeholder {
  background: rgba(248, 252, 255, 0.38);
  border-color: rgba(203, 213, 225, 0.35);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.light-theme .glass-panel,
.light-theme .file-card,
.light-theme .assistant-bubble,
.light-theme .modal-content {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}


.light-theme .sidebar h2 {
  color: var(--text-secondary);
}

.light-theme .assistant-bubble {
  background: var(--card-bg);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .assistant-bubble header strong {
  color: var(--text-primary);
}

.light-theme .chat-input-area input {
  background: var(--input-bg);
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .chat-message.bot {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.light-theme .user-chip {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .user-chip:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--accent);
}

.light-theme .status-pill {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
}

.light-theme .chip {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--text-secondary);
}

.light-theme .chip.active,
.light-theme .chip:hover {
  background: var(--accent);
  color: white;
  border-color: transparent;
}

.light-theme .empty-state {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
}

.sidebar-secondary-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.sidebar-secondary-btn:hover {
  background: var(--surface-strong);
}

.sidebar-ai-btn {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.folder-select-item {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface-light);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  border: 1px solid transparent;
}

.folder-select-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.folder-select-item.selected {
  background: rgba(79, 172, 254, 0.2);
  border-color: var(--accent);
}


.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  margin-bottom: 12px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.sidebar-ai-btn:hover {
  background: var(--surface-strong);
}

.upload-btn-label {
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(69, 255, 230, 0.85), rgba(114, 163, 255, 0.85));
  border: none;
  color: rgba(14, 24, 46, 0.92);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.upload-btn-label:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(69, 255, 230, 0.3);
}

.fab-menu-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 12px;
}

.fab-menu-label:hover {
  background: var(--surface-strong);
}

.fab-menu-label .material-icons {
  font-size: 20px;
  color: var(--accent);
}

.prop-btn {
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.prop-btn-primary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 500;
}

.prop-btn-primary:hover {
  background: rgba(69, 255, 230, 0.25);
}

.prop-btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 500;
}

.prop-btn-secondary:hover {
  background: var(--surface-strong);
}

.light-theme .prop-btn-primary {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.2);
  color: #2563eb;
}

.light-theme .prop-btn-primary:hover {
  background: rgba(37, 99, 235, 0.15);
}

.sidebar-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(69, 255, 230, 0.35);
}

main.drive {
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 26px 26px 60px 26px;

  position: relative;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-header h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 28px;
}

.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-header.compact {
  margin-top: 12px;
  margin-bottom: 18px;
  justify-content: center;
}

.chip {
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;

  font-size: 13px;

  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.1);
}

.chip.active,
.chip:hover {
  color: #000;
  background: var(--accent);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));

  gap: 16px;

  padding: 12px;
}

@media (max-width: 600px) {
  .file-grid {
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));

  }
}

.empty-state {
  grid-column: 1 / -1;
  place-self: center;

  margin: auto;

  max-width: 450px;
  border-radius: 24px;
  padding: 32px;
  background: rgba(10, 15, 34, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.file-card {
  padding: 14px;
  border-radius: 20px;
  background: var(--surface);
  border: var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  height: auto;
  width: 100%;

  max-width: 100%;

  min-height: 200px;

  box-sizing: border-box;

}

.file-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: var(--surface-strong);
  box-shadow: var(--accent-glow);
}

.file-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;

  width: 100%;
  flex: 1;

  min-width: 0;

}

.file-meta-row {
  display: flex;
  flex-direction: column;

  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-width: 0;

  max-width: 100%;

}

.file-meta h3 {
  margin: 0;
  font-size: 14px;

  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;

  line-clamp: 2;

  -webkit-box-orient: vertical;
  word-break: break-all;

  overflow-wrap: anywhere;

  white-space: normal;

  width: 100%;
  max-width: 100%;

  line-height: 1.3;
  min-height: 1.3em;

}

.file-meta span {
  font-size: 12px;
  color: var(--text-secondary);
}

.file-desc {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;

  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  margin-top: 4px;
}


.file-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 3px;

  margin-top: auto;
  width: 100%;
  justify-content: flex-start;

  overflow-x: auto;
  padding-bottom: 2px;
}


.file-actions::-webkit-scrollbar {
  display: none;
}


.file-grid:not(.list-view) .file-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.file-grid:not(.list-view) .file-icon span {
  font-size: 28px !important;
}

.file-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  border-radius: 12px;
  width: 36px;

  height: 36px;

  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 0;
  flex-shrink: 0;

}

.file-action-btn:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

.file-action-btn.is-favorite {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.4);
}

.file-action-btn.is-favorite span {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.file-action-btn span {
  font-size: 18px;

}

.file-card:hover .file-actions {
  opacity: 1;
}

.file-action-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text-primary);
  border-radius: 10px;

  width: 36px;
  height: 36px;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  font-size: 16px;
}

.file-action-btn:hover {
  background: var(--surface-strong);
  transform: translateY(-2px);
}

.file-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2), 0 12px 40px rgba(6, 182, 212, 0.15);
  background: rgba(255, 255, 255, 0.6);
}

.light-theme .file-card.selected {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--accent);
}

.file-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;

  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.drive-section {
  display: grid;
  gap: 32px;
}

.drive-section.hidden {
  display: none !important;
}

.server-connect {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(11, 19, 34, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.server-connect label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.server-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.server-bar input {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 12, 30, 0.55);
  color: var(--text-primary);
  font-size: 14px;
}

.server-bar input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.server-bar button {
  padding: 12px 22px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, rgba(69, 255, 230, 0.85), rgba(114, 163, 255, 0.85));
  color: rgba(14, 24, 46, 0.92);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.server-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(69, 255, 230, 0.35);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
}

.status-pill.success {
  border-color: rgba(89, 255, 160, 0.6);
  background: rgba(89, 255, 160, 0.18);
  color: rgba(20, 46, 37, 0.85);
}

.status-pill.error {
  border-color: rgba(255, 105, 120, 0.65);
  background: rgba(255, 105, 120, 0.2);
  color: rgba(64, 23, 33, 0.95);
}

.status-pill.loading {
  border-color: rgba(114, 163, 255, 0.5);
  background: rgba(114, 163, 255, 0.18);
  color: rgba(21, 31, 61, 0.85);
}

.file-meta {
  display: grid;
  gap: 6px;
}

.file-meta {
  display: grid;
  gap: 6px;
}

.file-desc {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: normal;
  opacity: 0.6;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.file-meta h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.file-meta span {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.8;
}

.file-meta-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress>div {
  height: 100%;
  border-radius: inherit;
}


.drive-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 12px;
  margin-bottom: 12px;
}


.drive-toolbar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drive-toolbar-top {
  display: flex;
  justify-content: center;
}


.drive-header-row {
  display: flex;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
  height: 40px;
}

.storage-widget {
  width: 260px;
}

.drive-header-row .status-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 2;
}

@media (max-width: 980px) {
  .drive-header-row {
    flex-direction: column-reverse;

    height: auto;
    align-items: center;

    gap: 12px;
    margin-bottom: 12px;
  }


  .drive-header-row .status-pill {
    position: static;
    left: auto;
    transform: none;
    align-self: center;


    width: 100%;

    width: auto;
  }

  .storage-widget {
    width: 100%;
  }
}

.drive-toolbar-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;

  gap: 12px;
  width: 100%;
  overflow: hidden;

}

.filter-chips {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;

  overflow-x: auto;

  align-items: center;
  scrollbar-width: none;

  -ms-overflow-style: none;
  padding: 4px 0;

}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.sort-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;

}

.sort-controls label {
  font-size: 13px;
  color: var(--text-secondary);
}

.sort-controls select {
  background: rgba(12, 17, 38, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.curation-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.curation-card {
  padding: 20px;
  border-radius: 22px;
  background: rgba(10, 15, 34, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 10px;
}

.curation-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.section-placeholder {
  padding: 36px;
  border-radius: 26px;
  background: rgba(10, 15, 34, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 18px;
}

.section-placeholder h2 {
  margin: 0;
  font-size: 24px;
  font-family: "Sora", sans-serif;
}

.section-placeholder ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.ai-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
}

.ai-panel h2 {
  font-family: "Sora", sans-serif;
  margin: 0;
  font-size: 22px;
}

.ai-panel p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.ai-actions {
  display: grid;
  gap: 14px;
}

.ai-action {
  padding: 18px;
  border-radius: 22px;
  background: rgba(14, 20, 41, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 12px;
}

.ai-action strong {
  font-size: 15px;
  font-weight: 600;
}

.ai-action span {
  font-size: 13px;
  color: var(--text-secondary);
}

.ai-action .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-action .tag {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(69, 255, 230, 0.25);
  color: rgba(12, 19, 35, 0.9);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.assistant-bubble {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(69, 255, 230, 0.45);
  background: rgba(7, 14, 34, 0.6);
  display: grid;
  gap: 12px;
}

.assistant-bubble header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal.active {
  visibility: visible;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(7, 12, 30, 0.65);
}

.modal-content {
  position: relative;
  width: min(520px, 90vw);
  padding: 32px;
  display: grid;
  gap: 18px;
  z-index: 1;
}

.modal-close,
.close-btn {
  position: absolute;
  top: 25px;
  right: 30px;
  border: none !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 50% !important;
  width: 28px !important;
  height: 28px !important;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0 !important;
  line-height: 1;
  box-shadow: none !important;
}

.modal-close:hover,
.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.modal-tabs {
  display: flex !important;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 30px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: fit-content;
  margin: -15px auto 5px 0 !important;
  backdrop-filter: blur(8px);
}

.modal-tab {
  border: none !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 600;
  padding: 8px 24px !important;
  margin: 0;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  text-align: center;
  font-size: 14px;
  box-shadow: none !important;
}

.modal-tab:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-tab.active {
  background: #1cb7ff !important;
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(28, 183, 255, 0.3) !important;
}

.modal-tab:not(.active) {
  background: transparent !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form.hidden {
  display: none;
}

.auth-form label {
  font-size: 13px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
}

.auth-form input,
.auth-form select {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(7, 14, 34, 0.55);
  color: var(--text-primary);
  font-size: 14px;
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.password-toggle {
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  background: transparent !important;
  border: none !important;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border-radius: 8px;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle .eye-closed {
  display: none;
}

.password-toggle.show-password .eye-open {
  display: none;
}

.password-toggle.show-password .eye-closed {
  display: block;
}

.auth-form button[type="submit"] {
  margin-top: 0px;
  padding: 14px 20px;
  border-radius: 16px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(120deg, rgba(69, 255, 230, 0.9), rgba(108, 122, 255, 0.9));
  color: rgba(12, 19, 35, 0.95);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-form button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(69, 255, 230, 0.35);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;

  color: var(--text-secondary);
  white-space: nowrap;
  flex-wrap: nowrap;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;

}

.checkbox-row label {
  white-space: nowrap;
  margin: 0;
  display: inline-block;
}

.modal small {
  color: var(--text-secondary);
  font-size: 12px;
}

.assistant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.assistant-actions button {
  border: 1px solid rgba(69, 255, 230, 0.6);
  background: transparent;
  color: var(--text-primary);
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.assistant-actions button:hover {
  background: rgba(69, 255, 230, 0.7);
  color: rgba(12, 19, 35, 0.92);
}

.form-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-feedback.visible {
  opacity: 1;
  transform: translateY(0);
}

.form-feedback.success {
  border-color: rgba(89, 255, 160, 0.6);
  background: rgba(89, 255, 160, 0.18);
  color: rgba(20, 46, 37, 0.85);
}

.form-feedback.error {
  border-color: rgba(255, 105, 120, 0.65);
  background: rgba(255, 105, 120, 0.2);
  color: rgba(64, 23, 33, 0.95);
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-step {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.22);
}

а .timeline-step strong {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.7);
}

.timeline-step span {
  font-size: 12px;
  color: var(--text-secondary);
}


.offline-modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 13, 43, 0.95);
  backdrop-filter: blur(10px);
  z-index: 99999;
  display: none;
  place-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.offline-modal.active {
  display: flex;
}

.offline-content {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 40px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 90%;
  width: 320px;
}

.offline-content i {
  font-size: 48px;
  color: #ff4d4d;
  margin-bottom: 8px;
}

.offline-content h2 {
  margin: 0;
  font-size: 20px;
  color: white;
}

.offline-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  line-height: 1.5;
}

.offline-content button {
  margin-top: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}


#accountSettingsModal input[type="text"],
#accountSettingsModal input[type="email"],
#accountSettingsModal input[type="password"] {
  width: 100%;
  display: block;
  padding: 12px 16px;
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(14, 20, 41, 0.6);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}


#forgotModal input,
#resetModal input {
  width: 100%;
  display: block;
  padding: 14px 16px;
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(14, 20, 41, 0.6);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
}

#forgotModal input:focus,
#resetModal input:focus {
  border-color: var(--accent);
  background: rgba(20, 28, 55, 0.8);
}

#forgotModal label,
#resetModal label {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 5px;
  font-weight: 500;
}

#forgotModal button[type="submit"],
#resetModal button[type="submit"] {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #2e9bfa 100%);
  color: #000;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 24px;
  box-shadow: 0 4px 15px rgba(69, 255, 230, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

#forgotModal button[type="submit"]:active,
#resetModal button[type="submit"]:active {
  transform: scale(0.98);
}

#accountSettingsModal input:focus {
  border-color: rgba(69, 255, 230, 0.5);
  background: rgba(14, 20, 41, 0.8);
  outline: none;
}

#accountSettingsSave {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, rgba(69, 255, 230, 0.8), rgba(82, 102, 255, 0.8));
  color: #0b1121;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

#accountSettingsSave:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(69, 255, 230, 0.25);
}

#accountSettingsLogout {
  background: rgba(255, 105, 120, 0.15);
  border: 1px solid rgba(255, 105, 120, 0.3);
  color: #ff6978;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}


@media (max-width: 980px) {
  .user-chip {
    width: fit-content !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    max-width: 100%;
    margin-inline: auto !important;

    margin-top: 12px !important;

  }

  .user-chip-main {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .user-chip-actions {
    margin-left: 8px !important;

  }
}

#accountSettingsLogout:hover {
  background: rgba(255, 105, 120, 0.25);
  color: var(--text-secondary);
}

footer {
  padding: 0 48px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

footer .cta {
  display: flex;
  gap: 12px;
}

footer .cta a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer .cta a:hover {
  color: var(--accent);
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 240px 1fr;
  }

  .ai-panel {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .assistant-bubble,
  .ai-actions {
    flex: 1;
    min-width: 260px;
  }
}

@media (max-width: 980px) {
  header.topbar {
    flex-direction: column;

    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    padding-top: 24px;

    gap: 16px;

    margin-bottom: 12px;
  }

  header.topbar .logo {
    position: static;

    transform: none;
    margin: 0;
  }

  header.topbar .search-box {
    order: 2;

    width: 100%;
    margin-top: 0;

  }



  main.drive {
    padding: 16px 16px 60px 16px;

    gap: 16px;
  }


  .drive-toolbar {
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "status sort"
      "filter filter";
    gap: 16px 8px;
    align-items: center;
    margin-bottom: 24px;
  }

  .drive-toolbar-bottom {
    display: contents !important;

  }

  .status-pill {
    grid-area: status;
    justify-self: start;
    margin: 0 !important;
  }

  .sort-controls {
    grid-area: sort;
    justify-self: end;
    margin: 0 !important;
  }

  .sort-controls label {
    display: none;

  }

  .filter-chips {
    grid-area: filter;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: nowrap !important;

    justify-content: flex-start;
  }


  #mobileMenuBtn {
    display: block !important;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .search-box {
    width: 100%;
  }

  .offline-toast {
    width: 90%;
    bottom: 20px;
    font-size: 14px;
  }



  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  body {
    padding: 16px;
  }
}

@media (max-width: 540px) {
  .modal-content {
    padding: 24px;
    padding-top: 52px;

  }

  .modal-close {
    top: 14px;
    right: 14px;
  }

  .modal-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .server-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .server-bar button {
    width: 100%;
  }
}

.photo-viewer {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.photo-viewer.active {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.photo-viewer img,
.photo-viewer video {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  display: block;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.photo-viewer #viewerTitle {
  position: absolute;
  top: 32px;
  left: 32px;
  color: white;
  margin: 0;
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.close-viewer {
  position: absolute;
  top: 32px;
  right: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
  z-index: 1010;
}

.close-viewer:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.photo-viewer pre {
  background: rgba(30, 32, 44, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #e2e8f0;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-width: 80%;
  max-height: 80vh;
  overflow: auto;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}


.photo-viewer pre::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.photo-viewer pre::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.photo-viewer pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.photo-viewer pre::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}


.assistant-bubble {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
  min-height: 100px;
  font-size: 13px;
}

.chat-message {
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 90%;
  word-wrap: break-word;
  line-height: 1.4;
}

.chat-message.bot {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-message.user {
  background: rgba(69, 255, 230, 0.2);
  color: var(--text-primary);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input-area {
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(7, 12, 30, 0.4);
  color: var(--text-primary);
  font-size: 13px;
}

.chat-input-area button {
  padding: 8px 12px;
  border-radius: 12px;
  border: none;
  background: rgba(69, 255, 230, 0.7);
  color: #0b1121;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-input-area button:hover {
  background: rgba(69, 255, 230, 0.9);
}

.assistant-actions {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.assistant-actions button {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 6px 10px;
}



@media (max-width: 768px) {

  body::before,
  body::after {
    opacity: 0.2;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 16px;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;

    z-index: auto;
    position: static;

  }

  header.topbar {
    padding: 24px 16px 8px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 101;
    position: relative;
  }

  .logo {
    margin-right: auto;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
  }


  #mobileMenuBtn {
    display: block !important;
    font-size: 24px;
    z-index: 3000;
    padding: 8px;
    color: var(--text-primary);
    background: none;
    border: none;
    position: relative;
    left: auto;
    top: auto;
    margin: 0;
    margin-right: 4px;
    align-self: auto;
  }


  .user-chip,
  .auth-btn {
    width: 100%;
    order: 3;
    margin-top: 4px;
    justify-content: space-between;

  }


  .user-chip {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;

    padding: 12px 16px;
  }


  .search-box {
    order: 4;
    width: 100%;
    margin-top: 2px;
    max-width: none;
    position: relative;
    z-index: 1;
    flex: 0 0 100%;
  }

  .search-box input {
    padding: 12px 16px 12px 42px;

    font-size: 14px;
    height: auto;
    border-radius: 18px;

  }

  .search-icon {
    left: 14px;
    font-size: 20px;
  }

  .mic-icon {
    display: block;
  }







  aside.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 85%;
    max-width: 300px;
    background: #0b1026;
    z-index: 2002;

    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    transform: translateX(-105%);

    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.8);
    padding: 20px;
    padding-top: 60px;
    visibility: hidden;

    overflow-y: auto;
    will-change: transform;

  }

  aside.sidebar.active {
    transform: translateX(0);
    visibility: visible;
  }


  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .file-card {
    animation: fadeInUp 0.4s ease-out backwards;
  }


  .file-card:nth-child(1) {
    animation-delay: 0.05s;
  }

  .file-card:nth-child(2) {
    animation-delay: 0.1s;
  }

  .file-card:nth-child(3) {
    animation-delay: 0.15s;
  }

  .file-card:nth-child(4) {
    animation-delay: 0.2s;
  }

  .file-card:nth-child(5) {
    animation-delay: 0.25s;
  }

  .file-card:nth-child(n+6) {
    animation-delay: 0.3s;
  }




  .sidebar .user-chip {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    width: 100%;
  }

  .sidebar .user-chip-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
    margin-top: 4px;
  }

  .sidebar .nav-btn {
    width: 100%;
    margin-bottom: 8px;
    justify-content: center;
  }


  .file-actions {
    flex-wrap: wrap;

    gap: 6px;

  }

  .file-action-btn {
    width: 28px;

    height: 28px;
    font-size: 14px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .upload-card {
    padding: 16px;
    margin-top: 20px;
  }

  .upload-card p {
    font-size: 11px;
  }

  .ai-panel {
    display: contents;

    position: static;
    width: 100%;
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;

  }


  .file-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }

  #sidebarOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);

    z-index: 2001;

    display: none;
    opacity: 0;
    transition: opacity 0.3s;
  }

  #sidebarOverlay.active {
    display: block;
    opacity: 1;
  }

  #propertiesPanelOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    -webkit-tap-highlight-color: transparent;
  }

  #propertiesPanelOverlay.active {
    display: block;
    opacity: 1;
  }

  .modal-content {
    width: 92vw;
    padding: 20px;
  }
}




.bottom-nav,
.fab-overlay,
.fab-menu {
  display: none;
}

@media (max-width: 768px) {


  .sidebar .nav-list,
  .sidebar h2[data-i18n="sidebar_header"] {
    display: none;
  }


  main.drive {
    padding-bottom: 100px !important;

  }


  .bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;

    background: rgba(11, 16, 38, 0.85);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5000;
    padding-bottom: env(safe-area-inset-bottom, 20px);

    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  }

  .bottom-nav .nav-item {
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    width: 64px;
    justify-content: center;
  }

  .bottom-nav .nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
  }

  .bottom-nav .nav-item.active {
    color: var(--accent);
    background: transparent;

    border: none;
  }

  .bottom-nav .nav-item.active svg {
    filter: drop-shadow(0 0 8px rgba(69, 255, 230, 0.6));
  }


  .fab-wrapper {
    position: relative;
    top: -24px;

    z-index: 5002;
  }

  .fab-main {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #6c42ff);
    border: 4px solid #0b1026;

    box-shadow: 0 8px 20px rgba(69, 255, 230, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b1121;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;

    margin: 0;

    line-height: 1;

  }

  .fab-main .material-icons {
    margin-top: -10px;

    font-size: 32px;

  }

  .fab-main:active {
    transform: scale(0.9);
  }


  .fab-menu {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(18, 24, 48, 0.9);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 5001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    width: 200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .fab-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    border-radius: 12px;
    width: 100%;
    white-space: nowrap;

  }

  .fab-menu span.material-icons {
    color: var(--accent);
    font-size: 24px;

    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .fab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 4999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    display: block;

  }

  .fab-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}


.sort-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-controls label {
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

.sort-controls select {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.sort-controls .icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.sort-controls .icon-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-primary) !important;
}


.file-grid.list-view {
  grid-template-columns: 1fr;
  gap: 4px;

}

.list-view .file-card {
  flex-direction: row;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  height: 48px;
  gap: 12px;
  width: 100% !important;

  max-width: none !important;

  min-height: 48px;
}

.list-view .file-card:hover {
  transform: none;
  background: var(--surface-strong);
}

.list-view .file-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

.list-view .file-icon span.material-icons {
  font-size: 18px !important;
  color: #fff !important;
}

.list-view .file-meta {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex: 1;

  width: auto;
  gap: 16px;
  min-width: 0;

}

.list-view .file-meta-row {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 120px 80px;

}

.list-view .file-meta h3 {
  font-size: 13px;

  margin: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-view .file-meta span {
  font-size: 13px;
  text-align: right;
  opacity: 0.7;
}


.file-date {
  display: none;

}

.list-view .file-date {
  display: block;

}


.list-view .file-desc {
  display: none;
}

.list-view .file-actions {
  width: auto;
  margin-top: 0;
  opacity: 0;

  transition: opacity 0.2s;
  display: flex;
  gap: 2px;

  flex-wrap: nowrap !important;

  flex-shrink: 0;
}

.list-view .file-card:hover .file-actions {
  opacity: 1;
}

.list-view .file-action-btn {
  padding: 4px;

  border-radius: 6px;
}

.list-view .file-action-btn span {
  font-size: 18px !important;
}


[data-view-section="analytics"] {
  padding-top: 0 !important;
  margin-top: -30px;
}

.analytics-header {
  margin-bottom: 2px;
}

.analytics-header h1 {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.analytics-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.main-chart-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  padding: 8px 24px;
  align-items: center;
  margin-top: -10px;
}

.chart-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
}

.chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.chart-center span {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
}

.chart-center small {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.donut-svg {
  width: 100%;
  height: 100%;
}

.donut-segment {
  transition: stroke-dashoffset 1s ease-out;
}

.analytics-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legend-item .dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.legend-item .label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  flex: 1;
}

.legend-item .value {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.analytics-detail-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 20px;
}

.analytics-detail-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.analytics-detail-card .card-icon span {
  font-size: 28px;
}

.analytics-detail-card .card-info {
  flex: 1;
}

.analytics-detail-card h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
}

.analytics-detail-card p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.card-meta {
  width: 80px;
  text-align: right;
}

.card-meta strong {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}

.mini-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.mini-progress .bar {
  height: 100%;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .main-chart-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 30px 20px;
  }

  .analytics-legend {
    grid-template-columns: 1fr;
  }
}

/* AI Moderator Styles */
@keyframes rotating {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.rotating {
  animation: rotating 2s linear infinite;
  display: inline-block;
}

.mod-badge-safe { color: #45ffe6; background: rgba(69, 255, 230, 0.15); border: 1px solid rgba(69, 255, 230, 0.2); }
.mod-badge-warning { color: #ffd166; background: rgba(255, 209, 102, 0.15); border: 1px solid rgba(255, 209, 102, 0.2); }
.mod-badge-danger { color: #ff6978; background: rgba(255, 105, 120, 0.15); border: 1px solid rgba(255, 105, 120, 0.2); }

.file-card.mod-danger { border: 1px solid rgba(255, 105, 120, 0.3); background: rgba(255, 105, 120, 0.05); }
.file-card.mod-warning { border: 1px solid rgba(255, 209, 102, 0.3); }

#propModStatus {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border: 1px solid transparent;
  flex-shrink: 0;
  white-space: nowrap;
}

#propModerationContainer {
  transition: all 0.2s ease;
}

/* AI Editor Agent Styles */
.ai-editor-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.ai-editor-chip:hover {
  background: rgba(69, 255, 230, 0.15);
  border-color: rgba(69, 255, 230, 0.35);
  color: #45ffe6;
  transform: translateY(-1px);
}

.ai-editor-chip:active {
  transform: translateY(0);
}

.ai-editor-chip.active {
  background: rgba(69, 255, 230, 0.25);
  border-color: #45ffe6;
  color: #45ffe6;
  font-weight: 600;
}

#aiEditorAgentPanel::-webkit-scrollbar {
  width: 6px;
}

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

#aiEditorAgentPanel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

#aiEditorAgentPanel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 900px) {
  #viewerTextContainer {
    flex-direction: column !important;
    height: 80vh !important;
    width: 95% !important;
    overflow-y: auto;
    padding-bottom: 20px;
  }
  #aiEditorAgentPanel {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    flex-shrink: 1 !important;
  }
  #viewerEditor, #viewerText {
    height: 45vh !important;
  }
}

/* Premium Security Badge Styles */
.security-card {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.security-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(69, 255, 230, 0.2);
  transform: translateY(-2px);
}

.security-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #45ffe6;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.security-card-header span {
  font-size: 16px !important;
}

.security-badge-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  width: fit-content;
  cursor: default;
  transition: all 0.2s ease;
}

.security-badge:hover {
  border-color: rgba(69, 255, 230, 0.4);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 4px 12px rgba(69, 255, 230, 0.05);
}

.security-badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #45ffe6;
  box-shadow: 0 0 8px #45ffe6;
}

.security-card-desc {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Auth Security Badges */
.auth-security-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  margin-top: 4px;
}

.security-badge-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  cursor: default;
}

.security-badge-pill:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(69, 255, 230, 0.3);
  color: #fff;
}

.security-badge-pill span.material-icons {
  font-size: 12px !important;
  color: #45ffe6;
}

/* ==========================================================================
   PREMIUM PPTX PRESENTATION SLIDESHOW VIEWER
   ========================================================================== */

.pptx-viewer-container {
  display: flex;
  width: 95vw;
  height: 80vh;
  max-width: 1400px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  font-family: 'Inter', sans-serif;
  color: #f8fafc;
}

.pptx-sidebar {
  width: 280px;
  flex: 0 0 auto;
  background: rgba(15, 23, 42, 0.6);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pptx-sidebar-title {
  padding: 20px 24px;
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent, #45ffe6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-transform: uppercase;
}

.pptx-thumbnails-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pptx-thumbnail-card {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pptx-thumbnail-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.pptx-thumbnail-card.active {
  background: rgba(69, 255, 230, 0.08);
  border-color: var(--accent, #45ffe6);
  box-shadow: 0 0 12px rgba(69, 255, 230, 0.15);
}

.pptx-thumbnail-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent, #45ffe6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pptx-thumbnail-title {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pptx-main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.3) 0%, rgba(15, 23, 42, 0.6) 100%);
  height: 100%;
}

.pptx-slide-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}

.pptx-slide-canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 900px;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
  container-type: inline-size;
}

.pptx-slide-canvas p,
.pptx-slide-canvas span,
.pptx-slide-canvas li {
  font-size: 1.8cqw;
}

.pptx-slide-canvas h1,
.pptx-slide-canvas h2,
.pptx-slide-canvas h3 {
  font-size: 3.2cqw;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  margin-top: 0;
}

/* Light Theme (default for dark text slides) */
.pptx-slide-canvas.light-theme {
  background: #ffffff;
  color: #0f172a;
}
.pptx-slide-canvas.light-theme .pptx-slide-title {
  color: #1e1b4b;
  border-bottom: 3px solid #cbd5e1;
}
.pptx-slide-canvas.light-theme .pptx-slide-content {
  color: #334155;
}
/* Smart Contrast: Prevent white or near-white text in light theme from being invisible */
.pptx-slide-canvas.light-theme span[style*="color: #ffffff"],
.pptx-slide-canvas.light-theme span[style*="color: #FFFFFF"],
.pptx-slide-canvas.light-theme span[style*="color: #fff"],
.pptx-slide-canvas.light-theme span[style*="color: #FFF"],
.pptx-slide-canvas.light-theme span[style*="color: #eeeeee"],
.pptx-slide-canvas.light-theme span[style*="color: #EEEEEE"],
.pptx-slide-canvas.light-theme span[style*="color: #e2e8f0"],
.pptx-slide-canvas.light-theme span[style*="color: #E2E8F0"],
.pptx-slide-canvas.light-theme span[style*="color: #f8fafc"],
.pptx-slide-canvas.light-theme span[style*="color: #F8FAFC"],
.pptx-slide-canvas.light-theme span[style*="color: rgb(255, 255, 255)"] {
  color: #334155 !important;
}

/* Dark Theme (default for light text slides) */
.pptx-slide-canvas.dark-theme {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.1);
}
.pptx-slide-canvas.dark-theme .pptx-slide-title {
  color: var(--accent, #45ffe6);
  border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}
.pptx-slide-canvas.dark-theme .pptx-slide-content {
  color: #cbd5e1;
}

.pptx-slide-title {
  font-family: 'Sora', sans-serif;
  font-size: 36px;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 24px;
  line-height: 1.25;
  padding-bottom: 12px;
}

.pptx-slide-content {
  flex: 1;
  font-size: 18px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pptx-slide-content p {
  margin: 0;
}

.pptx-slide-content ul {
  margin: 0;
  padding-left: 24px;
}

.pptx-slide-content li {
  margin-bottom: 8px;
}

.pptx-controls {
  padding: 20px 40px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.pptx-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pptx-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--accent, #45ffe6);
  transform: translateY(-1px);
}

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

.pptx-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
}

.pptx-slide-indicator {
  font-family: 'Sora', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  min-width: 120px;
  text-align: center;
}

.pptx-viewer-container:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: none;
  border-radius: 0;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  backdrop-filter: none;
}

.pptx-viewer-container:fullscreen .pptx-sidebar {
  display: none;
}

.pptx-viewer-container:fullscreen .pptx-slide-wrapper {
  padding: 60px;
}

.pptx-viewer-container:fullscreen .pptx-slide-canvas {
  max-width: 1100px;
  padding: 64px;
}

.pptx-viewer-container:fullscreen .pptx-controls {
  padding: 24px 60px;
  background: rgba(15, 23, 42, 0.9);
}

@media (max-width: 768px) {
  .pptx-viewer-container {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    width: 95vw;
  }

  .pptx-sidebar {
    width: 100%;
    height: 120px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .pptx-sidebar-title {
    padding: 10px 16px;
    font-size: 13px;
  }

  .pptx-thumbnails-list {
    flex-direction: row;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 10px;
  }

  .pptx-thumbnail-card {
    flex: 0 0 120px;
    padding: 8px;
  }

  .pptx-slide-wrapper {
    padding: 16px;
  }

  .pptx-slide-canvas {
    padding: 24px;
    aspect-ratio: auto;
    min-height: 240px;
  }

  .pptx-slide-title {
    font-size: 22px;
    margin-bottom: 16px;
    padding-bottom: 8px;
  }

  .pptx-slide-content {
    font-size: 14px;
  }

  .pptx-controls {
    padding: 12px 16px;
  }
}