* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}
body {
  font-family: system-ui, sans-serif;
  background: #0a0f1e;
  color: #fff;
  overflow: hidden;
}
.vault-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}
.vault-overlay.hidden,
.hidden {
  display: none !important;
}

@keyframes floatBreathing {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}
.vault-modal {
  background: #111827;
  border: 2px solid #4ea1ff;
  padding: 30px 20px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 350px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #ff4757;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
}
.vault-input {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 5px;
  margin-bottom: 15px;
  outline: none;
  -webkit-text-security: disc;
}
.vault-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
}
.vault-btn.primary {
  background: #4ea1ff;
  color: #000;
}
.vault-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.back-btn {
  background: transparent;
  border: none;
  color: #4ea1ff;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
}
.storage-info {
  font-size: 0.85rem;
  color: #a5efaa;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.extend-btn {
  background: #f57f17;
  color: #000;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}
.vault-gallery {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: max-content;
  gap: 12px;
  align-content: start;
  direction: ltr;
  position: relative; /* 🚀 Allows absolute positioning for row/col tick bars */
  transition: padding-bottom 0.3s ease; /* 🚀 Smooth padding for toolbar */
}

/* 🚀 High-Tech Custom App-Style Vertical Scrollbar */
.vault-gallery::-webkit-scrollbar {
  width: 8px;
}
.vault-gallery::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}
.vault-gallery::-webkit-scrollbar-thumb {
  background: #4ea1ff;
  border-radius: 4px;
}
.vault-gallery::-webkit-scrollbar-thumb:hover {
  background: #a5efaa;
}
@media (min-width: 768px) {
  .vault-gallery {
    grid-template-columns: repeat(7, 1fr); /* PC: 7 columns */
    gap: 16px;
  }
}
.gallery-item {
  direction: ltr; /* Reset text direction inside */
  aspect-ratio: 1/1; /* Square for mobile */
  background: #1a2235;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  will-change: transform;
  display: block;
  height: auto;
}
@media (min-width: 768px) {
  .gallery-item {
    aspect-ratio: 3/4; /* Portrait for PC */
  }
}
.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 161, 255, 0.3);
  border-color: rgba(78, 161, 255, 0.5);
}
.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fab-upload {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #a5efaa;
  color: #000;
  font-size: 2rem;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
