/* 
   ShareX Vault - Minimalist Flat Grey & Black Design System
   Created by Antigravity
*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --font-base: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-base);

  /* Minimalist Palette - Flat Black, Greys, and Off-White */
  --bg-deep: #000000;
  --bg-dark: #0d0d0d;
  --bg-card: #121212;
  --bg-card-hover: #161616;
  --bg-surface: #0a0a0a;
  
  --border-dim: #1e1e1e;
  --border-light: #2c2c2c;
  --border-active: #444444;
  
  /* Solid Brand Shades */
  --primary: #ffffff;
  --primary-hover: #e0e0e0;
  --cyan: #888888;
  --danger: #333333;
  --danger-hover: #555555;
  --success: #ffffff;

  --text-bright: #ffffff;
  --text-main: #b3b3b3;
  --text-muted: #777777;
  --text-dim: #444444;

  --shadow-premium: none;
  --transition-fast: all 0.15s ease-out;
  --transition-normal: all 0.25s ease-out;
}

/* Reset & Scrollbar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: #2c2c2c;
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: #555555;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-bright);
}

.text-gradient, .text-cyan-gradient {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  color: var(--text-bright);
  display: inline;
}

/* Layout */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Minimal Flat Card */
.cyber-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 0px; /* Flat look */
  box-shadow: none;
  transition: var(--transition-normal);
}

.cyber-card:hover {
  border-color: var(--border-active);
  background: var(--bg-card-hover);
}

/* Flat Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: 0px; /* Flat look */
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  outline: none;
  border: 1px solid var(--border-light);
  background: #111;
  color: var(--text-bright);
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
}
.btn-primary:hover {
  background: #e0e0e0;
  border-color: #e0e0e0;
}

.btn-secondary {
  background: #000000;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: #111111;
  border-color: #555555;
  color: #ffffff;
}

.btn-cyan {
  background: #1e1e1e;
  border: 1px solid var(--border-light);
  color: var(--text-bright);
}
.btn-cyan:hover {
  background: #2a2a2a;
  border-color: #888888;
}

.btn-danger {
  background: #000000;
  border: 1px solid #444444;
  color: #ff5555;
}
.btn-danger:hover {
  background: #220000;
  border-color: #ff5555;
}

/* Minimal Flat Dropzone */
.dropzone-container {
  margin-bottom: 2.5rem;
}

.dropzone {
  border: 1px dashed var(--border-light);
  background: var(--bg-card);
  border-radius: 0px; /* Flat look */
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.dropzone:hover, .dropzone.dragover {
  border-color: #888888;
  background: var(--bg-card-hover);
}

.dropzone-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
}

.dropzone:hover .dropzone-icon {
  color: var(--text-bright);
}

.dropzone-text h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.dropzone-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Upload Progress */
.progress-container {
  width: 100%;
  max-width: 400px;
  margin-top: 1rem;
  display: none;
}

.progress-bar-bg {
  width: 100%;
  height: 4px;
  background: #222;
  border-radius: 0px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 0px;
  transition: width 0.1s ease-out;
}

/* Header & Stats Dashboard */
.header-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 1.5rem;
}

.brand-section h1 {
  font-size: 2rem;
  font-weight: 700;
}

.brand-section p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-radius: 0;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #1e1e1e;
  color: #ffffff;
  border: 1px solid var(--border-light);
}

.stat-text h3 {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-text p {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin-top: 0.15rem;
}

/* File Browser Panel */
.panel-title {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.search-wrapper {
  position: relative;
  max-width: 440px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  border-radius: 0px;
  background: #000000;
  border: 1px solid var(--border-dim);
  color: var(--text-bright);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: #888888;
  background: #050505;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

/* Media Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.media-card {
  position: relative;
  overflow: hidden;
  border-radius: 0px;
  border: 1px solid var(--border-dim);
  background: var(--bg-card);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: none; /* Flat design */
  border-color: #555555;
}

.media-aspect {
  aspect-ratio: 16/10;
  width: 100%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-dim);
  cursor: pointer;
}

.media-thumb {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}

.video-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #000000;
  border: 1px solid var(--border-light);
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 0px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-info {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-bright);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-date {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.card-btn-group {
  display: flex;
  border-top: 1px solid var(--border-dim);
  background: #080808;
}

.card-action {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.card-action:hover {
  background: #111111;
  color: var(--text-bright);
}

.card-action.delete-action:hover {
  background: #220505;
  color: #ff5555;
}

.card-action:not(:last-child) {
  border-right: 1px solid var(--border-dim);
}

/* Empty States */
.empty-gallery {
  grid-column: 1 / -1;
  text-align: center;
  padding: 6rem 2rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.empty-gallery h3 {
  font-size: 1.25rem;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Login Page Customization */
.login-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2rem;
  border: 1px solid var(--border-dim);
  border-radius: 0px;
}

.login-logo {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  text-align: center;
}

.login-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  text-align: center;
}

.input-block {
  margin-bottom: 1.5rem;
}

.input-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-field {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0px;
  background: #000000;
  border: 1px solid var(--border-dim);
  color: var(--text-bright);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.input-field:focus {
  border-color: #888888;
}

.login-button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem;
  font-size: 0.95rem;
}

.alert-box {
  color: #ff5555;
  background: #1a0000;
  border: 1px solid #550000;
  padding: 0.75rem;
  border-radius: 0px;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  display: none;
  text-align: center;
}

/* Lightbox Modal */
.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: #888;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
  z-index: 2100; /* Sit on top of absolutely everything */
}

.modal-close:hover {
  color: #fff;
}

/* Modal Navigation Arrows */
.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 3.5rem;
  font-weight: 200;
  cursor: pointer;
  user-select: none;
  z-index: 2100;
  padding: 1rem 1.5rem;
  transition: color 0.15s, background-color 0.15s;
  font-family: monospace;
}

.modal-arrow:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.05);
}

.modal-arrow-left {
  left: 1.5rem;
}

.modal-arrow-right {
  right: 1.5rem;
}

.modal-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  overflow: visible; /* Let the zoomed media expand across the full screen */
  z-index: 2050;
}

.modal-media {
  max-width: 90vw;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid #222;
  background: #000;
  transition: transform 0.05s ease-out; /* Smooth responsive transform tracking */
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.modal-caption {
  margin-top: 1rem;
  color: #888888;
  font-size: 0.9rem;
  font-family: var(--font-display);
  z-index: 2060;
  text-align: center;
  max-width: 80vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Public Viewer Screen */
.cinema-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.cinema-title {
  font-size: 1.3rem;
  font-weight: 600;
  max-width: 75%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cinema-screen {
  background: #000000;
  border-radius: 0px;
  border: 1px solid var(--border-dim);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
  min-height: 350px;
}

.cinema-glow {
  display: none;
}

.cinema-content {
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  z-index: 2;
  position: relative;
  border-radius: 0;
}

.zoomable {
  cursor: zoom-in;
}
.zoomable.zoomed {
  cursor: zoom-out;
  max-height: none;
  max-width: none;
  width: 100%;
}

.cinema-details {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  border-radius: 0;
}

.tech-specs {
  display: flex;
  gap: 2.5rem;
}

.spec-block strong {
  display: block;
  color: var(--text-bright);
  font-size: 0.95rem;
  margin-top: 0.2rem;
  font-family: var(--font-display);
}

.spec-block span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Floating Toast */
.neon-toast {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  background: #0a0a0a;
  border: 1px solid #444;
  color: var(--text-bright);
  padding: 0.8rem 1.4rem;
  border-radius: 0px;
  box-shadow: none;
  font-weight: 500;
  font-size: 0.9rem;
  z-index: 1000;
  transform: translateY(150%);
  opacity: 0;
  transition: all 0.2s ease-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.neon-toast.active {
  transform: translateY(0);
  opacity: 1;
}

/* Loader Animation */
.loader {
  border: 2px solid #222;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border-left-color: #fff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pagination */
.pager-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.pager-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .header-layout {
    flex-direction: column;
    align-items: flex-start;
  }
  .brand-section {
    width: 100%;
  }
  .header-layout .btn {
    width: 100%;
  }
  .tech-specs {
    gap: 1.5rem;
    width: 100%;
    justify-content: space-between;
  }
  .cinema-details {
    flex-direction: column;
    align-items: flex-start;
  }
  .cinema-details .btn {
    width: 100%;
  }

  /* The dashboard's outer container and inline-padded panels (2rem/2.5rem) ate most of a
     phone's width - tighten them so the media catalog and file grid have room to breathe. */
  .container {
    padding: 1.25rem 0.85rem !important;
  }
  .cyber-card {
    padding: 1.25rem !important;
  }

  /* Lightbox: the close button/arrows were sized and positioned for desktop and overlapped
     the media on narrow screens. */
  .modal {
    padding: 0.5rem;
  }
  .modal-close {
    top: 0.5rem;
    right: 0.75rem;
    font-size: 1.8rem;
  }
  .modal-arrow {
    font-size: 1.8rem;
    padding: 0.5rem 0.65rem;
  }
  .modal-arrow-left {
    left: 0.15rem;
  }
  .modal-arrow-right {
    right: 0.15rem;
  }
  .modal-content-wrapper {
    max-width: 96vw;
  }
  .modal-media {
    max-width: 96vw;
    max-height: 72vh;
  }
}
