/* ============================================================
   SECURE SHARE — Global Stylesheet
   Design: Dark glass-morphism, electric violet accent
   ============================================================ */

/* ── Google Font ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --bg-page:        #0b0e1a;
  --bg-surface:     rgba(255, 255, 255, 0.04);
  --bg-surface-hover: rgba(255, 255, 255, 0.07);
  --bg-input:       rgba(255, 255, 255, 0.05);

  --accent:         #7c5cfc;
  --accent-glow:    rgba(124, 92, 252, 0.35);
  --accent-light:   #a68dff;
  --accent-dark:    #5a3fd4;

  --text-primary:   #f0f0f8;
  --text-secondary: #8e8ea8;
  --text-muted:     #5a5a7a;

  --border:         rgba(255, 255, 255, 0.08);
  --border-accent:  rgba(124, 92, 252, 0.5);
  --border-focus:   rgba(124, 92, 252, 0.9);

  --success:        #34d399;
  --success-bg:     rgba(52, 211, 153, 0.1);
  --danger:         #f87171;
  --danger-bg:      rgba(248, 113, 113, 0.1);

  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  --shadow-card:    0 4px 32px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255,255,255,0.05) inset;
  --shadow-accent:  0 0 32px var(--accent-glow), 0 4px 16px rgba(0,0,0,0.4);

  --transition:     0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Ambient background orbs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(120px);
}

body::before {
  width: 600px;
  height: 600px;
  top: -200px;
  left: -100px;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.12) 0%, transparent 70%);
}

body::after {
  width: 500px;
  height: 500px;
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(90, 63, 212, 0.1) 0%, transparent 70%);
}

/* ── Layout Container ───────────────────────────────────────── */
.container,
.page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Centered layout for auth pages (login, register) */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── Typography ─────────────────────────────────────────────── */
h1 {
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #fff;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Top Navigation Bar ─────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(11, 14, 26, 0.85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin-bottom: 2.5rem;
}

.topbar .brand {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar .brand::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.topbar .logout-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.topbar .logout-link:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.125rem;
}

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 0.6875rem 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(124, 92, 252, 0.06);
}

input::placeholder {
  color: var(--text-muted);
}

/* ── Upload Zone ────────────────────────────────────────────── */
.upload-zone {
  position: relative;
  border: 1.5px dashed var(--border-accent);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  text-align: center;
  background: rgba(124, 92, 252, 0.04);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1.25rem;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(124, 92, 252, 0.08);
  box-shadow: 0 0 24px rgba(124, 92, 252, 0.15);
}

.upload-zone::before {
  content: '↑';
  display: block;
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.upload-zone .upload-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.25rem;
}

.upload-zone .upload-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ── Upload Inline Form Row ─────────────────────────────────── */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.upload-row {
  display: flex;
  gap: 0.875rem;
  align-items: flex-end;
}

.upload-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.6875rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 16px rgba(124, 92, 252, 0.4);
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 8px rgba(124, 92, 252, 0.3);
}

.btn-full {
  width: 100%;
  margin-top: 0.375rem;
}

/* ── Alert Messages ─────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 1rem 0;
  border: 1px solid transparent;
  line-height: 1.5;
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.2);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.2);
}

.alert-danger::before { content: '✕'; font-size: 0.875rem; margin-top: 1px; }
.alert-success::before { content: '✓'; font-size: 0.875rem; margin-top: 1px; }

/* ── Share Link Box ─────────────────────────────────────────── */
.share-link-box {
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

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

.share-link-box a {
  font-size: 0.9rem;
  color: var(--success);
  word-break: break-all;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
}

.share-link-box a:hover {
  color: #fff;
}

/* ── File Table ─────────────────────────────────────────────── */
.file-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}

thead tr {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 0.875rem 1.125rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 0.875rem 1.125rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: var(--bg-surface-hover);
}

td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-light);
  border: 1px solid var(--border-accent);
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  transition: all var(--transition);
}

.file-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.4);
}

.file-link::after {
  content: '↗';
  font-size: 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Auth Card ──────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-header {
  margin-bottom: 2rem;
  text-align: center;
}

.auth-header .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.5);
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.auth-header h1 {
  font-size: 1.625rem;
  margin-bottom: 0.375rem;
}

.auth-header p {
  font-size: 0.9rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a {
  font-weight: 500;
}

/* ── Download Page ──────────────────────────────────────────── */
.download-card {
  max-width: 440px;
  margin: 0 auto;
}

.download-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(124, 92, 252, 0.12);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

/* ── Divider with label ─────────────────────────────────────── */
.divider-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

/* ── Utility ────────────────────────────────────────────────── */
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.875rem; }
.mt-sm        { margin-top: 0.75rem; }
.mt-md        { margin-top: 1.25rem; }
.mt-lg        { margin-top: 2rem; }
.mb-md        { margin-bottom: 1.25rem; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ── Selection ──────────────────────────────────────────────── */
::selection {
  background: rgba(124, 92, 252, 0.35);
  color: #fff;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar  { padding: 0.875rem 1rem; }
  .card    { padding: 1.5rem 1.25rem; }

  h1 { font-size: 1.5rem; }

  .upload-row {
    flex-direction: column;
    gap: 1rem;
  }

  th, td {
    padding: 0.75rem 0.875rem;
  }
}/* ============================================================
   modal.css — Password modal styles
   Used by: index.php, download.php
   ============================================================ */

/* Dark blurred backdrop covering the whole screen */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

/* The white card that appears on top of the backdrop */
.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-card);
    position: relative;
}

/* Title row: "🔐 Enter password" + close button */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* × close button in the top-right corner */
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}