/* ==========================================
   PERSONAL VAULT - KRISHNA'S EDITION
   Ultra-Modern Dark Neon Glassmorphism UI
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121c;
  --card-bg: rgba(18, 25, 40, 0.65);
  --card-hover: rgba(28, 38, 60, 0.85);
  --border-color: rgba(0, 240, 255, 0.18);
  --border-glow: rgba(0, 240, 255, 0.5);
  
  --neon-cyan: #00f0ff;
  --neon-violet: #9d4edd;
  --neon-pink: #f72585;
  --neon-gold: #ffb703;
  --neon-emerald: #10b981;
  --neon-red: #ef4444;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;

  --header-height: 64px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  padding-top: var(--header-height);
}

/* Background Canvas Particles */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 10;
  max-width: 480px; /* Optimized for mobile feel while centering on desktop */
  margin: 0 auto;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  padding: 16px;
}

/* Desktop screen expansion override when needed */
@media (min-width: 768px) {
  .app-container {
    max-width: 800px;
    padding: 24px;
  }
}

/* ==========================================
   FIXED TOP HEADER
   ========================================== */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vault-logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.header-title {
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
}

.owner-badge {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid rgba(255, 183, 3, 0.4);
  color: var(--neon-gold);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(255, 183, 3, 0.2);
}

/* ==========================================
   VIEWS MANAGEMENT
   ========================================== */
.view {
  display: none;
  animation: fadeIn 0.35s ease forwards;
  width: 100%;
  flex: 1;
}

.view.active {
  display: flex;
  flex-direction: column;
}

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

/* Fixed/Floating Back Button inside Views */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-back:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  transform: translateX(-3px);
}

.view-header-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

/* ==========================================
   HOME VIEW (THREE MOBILE BUTTONS)
   ========================================== */
.welcome-banner {
  text-align: center;
  margin: 10px 0 24px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(157, 78, 221, 0.08));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.welcome-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.welcome-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.home-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 5px;
}

.menu-card {
  position: relative;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--neon-cyan);
  transition: var(--transition);
}

.menu-card.public::before { background: var(--neon-cyan); }
.menu-card.private::before { background: var(--neon-pink); }
.menu-card.admin::before { background: var(--neon-gold); }

.menu-card:hover, .menu-card:active {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.menu-card.public:hover { border-color: var(--neon-cyan); box-shadow: 0 10px 25px rgba(0, 240, 255, 0.25); }
.menu-card.private:hover { border-color: var(--neon-pink); box-shadow: 0 10px 25px rgba(247, 37, 133, 0.25); }
.menu-card.admin:hover { border-color: var(--neon-gold); box-shadow: 0 10px 25px rgba(255, 183, 3, 0.25); }

.menu-card-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.menu-card.public .menu-icon { background: rgba(0, 240, 255, 0.15); color: var(--neon-cyan); }
.menu-card.private .menu-icon { background: rgba(247, 37, 133, 0.15); color: var(--neon-pink); }
.menu-card.admin .menu-icon { background: rgba(255, 183, 3, 0.15); color: var(--neon-gold); }

.menu-info h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.menu-info p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.menu-arrow {
  font-size: 1.4rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.menu-card:hover .menu-arrow {
  transform: translateX(5px);
  color: #fff;
}

/* ==========================================
   PUBLIC VAULT VIEW (2 TILES X-AXIS, 6 PER SCREEN)
   ========================================== */
.public-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 8px;
}

/* Public tiles upgraded: larger, equal height, and text limit-friendly */
.public-tile {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 13px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 168px;
  height: 168px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.public-tile::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-violet));
}

.public-tile:hover {
  transform: translateY(-3px);
  border-color: var(--neon-cyan);
  box-shadow: 0 8px 20px rgba(0, 240, 255, 0.2);
}

.tile-header {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
  min-height: 2.5em;
}

.tile-answer {
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}


.input-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.input-hint.limit-warning { color: var(--neon-gold); }
.input-hint.limit-error { color: var(--neon-red); }

.form-input.limit-error, .form-textarea.limit-error {
  border-color: var(--neon-red) !important;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25) !important;
}

@media (max-width: 420px) {
  .app-container { padding: 12px; }
  .public-grid { gap: 12px; }
  .public-tile { min-height: 176px; height: 176px; padding: 15px 12px; }
  .tile-header { font-size: 0.74rem; }
  .tile-answer { font-size: 0.94rem; }
  .nav-bar { gap: 8px; }
  .view-header-title { font-size: 1rem; text-align: center; }
  .btn-back { padding: 8px 10px; font-size: 0.82rem; }
}

@media (min-width: 768px) {
  .public-grid { grid-template-columns: repeat(3, 1fr); }
  .public-tile { min-height: 178px; height: 178px; }
}

/* ==========================================
   PRIVATE VAULT VIEW (FOLDERS & FILES)
   ========================================== */
.folders-list, .files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.folder-item, .file-item {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.folder-item:hover, .file-item:hover {
  border-color: var(--neon-pink);
  transform: translateX(4px);
  background: var(--card-hover);
}

.folder-left, .file-left {
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.folder-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 6px rgba(255, 183, 3, 0.4));
}

.file-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.file-icon.img { background: rgba(16, 185, 129, 0.15); color: var(--neon-emerald); }
.file-icon.note { background: rgba(0, 240, 255, 0.15); color: var(--neon-cyan); }
.file-icon.ext { background: rgba(247, 37, 133, 0.15); color: var(--neon-pink); }

.folder-name, .file-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-type-badge {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.btn-open {
  background: linear-gradient(135deg, var(--neon-violet), var(--neon-pink));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
}

.btn-open:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(247, 37, 133, 0.5);
}

/* ==========================================
   ADMIN LOGIN VIEW
   ========================================== */
.login-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  margin-top: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-avatar {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, var(--neon-gold), var(--neon-pink));
  border-radius: 50%;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.4);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  background: rgba(7, 9, 14, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-violet));
  color: var(--text-dark);
  font-weight: 700;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.5);
  color: #fff;
}

/* ==========================================
   ADMIN DASHBOARD VIEW
   ========================================== */
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.admin-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.admin-tab-btn.active {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--neon-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.admin-subview {
  display: none;
}

.admin-subview.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

.card-section {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Checkbox Grid for Folder Selection in Password Generator */
.folder-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 180px;
  overflow-y: auto;
  background: rgba(7, 9, 14, 0.6);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: #fff;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--neon-cyan);
  cursor: pointer;
}

/* Key Cards Table / List */
.key-item {
  background: rgba(13, 18, 28, 0.9);
  border-left: 4px solid var(--neon-cyan);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.key-item.expired {
  border-left-color: var(--neon-red);
  opacity: 0.75;
}

.key-code {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--neon-cyan);
}

.key-item.expired .key-code { color: var(--neon-red); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-active { background: rgba(16, 185, 129, 0.2); color: var(--neon-emerald); }
.badge-expired { background: rgba(239, 68, 68, 0.2); color: var(--neon-red); }

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--neon-red);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: var(--neon-red);
  color: #fff;
}

.btn-edit {
  background: rgba(255, 183, 3, 0.15);
  border: 1px solid rgba(255, 183, 3, 0.4);
  color: var(--neon-gold);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-edit:hover {
  background: var(--neon-gold);
  color: var(--text-dark);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

/* ==========================================
   MODALS (PASSWORD PROMPT, NOTE VIEWER, IMAGE LIGHTBOX)
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--neon-red);
  color: #fff;
}

/* Alert Modal / Not Allowed Box */
.lock-icon-lg {
  font-size: 48px;
  text-align: center;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px rgba(247, 37, 133, 0.6));
}

/* Image Preview in Lightbox */
.lightbox-img {
  width: 100%;
  border-radius: var(--radius-sm);
  max-height: 60vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 14px;
}

.note-content-display {
  background: rgba(7, 9, 14, 0.9);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 0.95rem;
  margin-top: 14px;
  max-height: 50vh;
  overflow-y: auto;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* Notification Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlide 0.35s ease forwards;
}

.toast.error { border-color: var(--neon-red); }
.toast.success { border-color: var(--neon-emerald); }

@keyframes toastSlide {
  from { opacity: 0; transform: translateY(20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


/* Small bug-fixes: keep long admin rows/buttons from breaking mobile layout */
.folder-item > div:first-child,
.key-item > div:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.key-item {
  gap: 10px;
}

@media (max-width: 520px) {
  .folder-item, .file-item, .key-item {
    gap: 10px;
  }
  .action-buttons {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .key-item {
    align-items: flex-start;
  }
}

/* Viewer action buttons: Download / Fullscreen / Copy / Back */
.modal-action-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.modal-action-row {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.btn-tool {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.08);
}

.btn-tool.download {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  color: var(--neon-emerald);
}

.btn-tool.fullscreen {
  background: rgba(0, 240, 255, 0.13);
  border-color: rgba(0, 240, 255, 0.45);
  color: var(--neon-cyan);
}

.btn-tool.copy {
  background: rgba(255, 183, 3, 0.14);
  border-color: rgba(255, 183, 3, 0.45);
  color: var(--neon-gold);
}

.btn-tool:hover, .btn-tool:active {
  transform: translateY(-2px);
  filter: brightness(1.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.modal-back-btn {
  justify-content: center;
  min-height: 42px;
}

.image-actions .modal-back-btn {
  grid-column: span 2;
}

.note-actions .btn-tool,
.note-actions .modal-back-btn {
  flex: 1 1 140px;
}

@media (max-width: 380px) {
  .modal-action-grid {
    grid-template-columns: 1fr;
  }
  .image-actions .modal-back-btn {
    grid-column: auto;
  }
}
