/* DRM View-Once Vault - Security & Stealth Styling */
:root {
  --bg-deep: #07090e;
  --bg-card: #0f131f;
  --bg-card-hover: #161c2d;
  --border-color: #1e2638;
  --border-glow: #00f2fe;
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-red: #ff3366;
  --accent-green: #00ff88;
  --text-main: #f0f4f8;
  --text-muted: #8a99ad;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Subtle cyber grid background */
.bg-grid {
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(0, 242, 254, 0.08) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* Header & Nav */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #05070c;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.4), transparent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #05070c;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.35);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

.btn-danger {
  background: rgba(255, 51, 102, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 51, 102, 0.25);
}

.btn-danger-solid {
  background: linear-gradient(135deg, #ff3366, #ff5e62);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3);
}

/* Upload Drop Zone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 14px;
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.015);
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.03);
}

.dropzone-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

/* Preview Area */
.preview-container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1.25rem;
}

.preview-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-select, .form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-main);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-select:focus, .form-input:focus {
  border-color: var(--accent-cyan);
}

/* Switch / Checkbox */
.switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.switch-label:hover {
  background: rgba(255, 255, 255, 0.04);
}

.switch-input {
  appearance: none;
  width: 44px;
  height: 24px;
  background: #252e42;
  border-radius: 9999px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.3s;
}

.switch-input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.3s;
}

.switch-input:checked {
  background: var(--accent-cyan);
}

.switch-input:checked::before {
  transform: translateX(20px);
}

/* Modal */
.modal-overlay,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active,
.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content,
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  margin: auto;
}

/* QR Code Box */
.qr-container {
  display: flex;
  justify-content: center;
  padding: 1.25rem;
  background: #ffffff;
  border-radius: 12px;
  margin: 1.5rem auto;
  width: fit-content;
}

/* User Info Bar */
.user-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
}

/* Security Badges & Ticker */
.shield-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
}

/* --- CANVAS & DRM VIEWER STYLES --- */
.viewer-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.canvas-wrapper {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(0, 242, 254, 0.25);
  background: #000;
  max-width: 100%;
}

canvas#drmCanvas {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

/* Anti-screenshot Fullscreen Blackout Shield */
#screenshotShield {
  position: fixed;
  inset: 0;
  background: #06080d;
  z-index: 999999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: #fff;
}

#screenshotShield.active {
  display: flex !important;
}

.shield-warning-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 51, 102, 0.15);
  border: 2px solid var(--accent-red);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(255, 51, 102, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); }
}

/* Table of uploads */
.table-container {
  overflow-x: auto;
  margin-top: 1.5rem;
}

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

.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-active {
  background: rgba(0, 255, 136, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-burned {
  background: rgba(255, 51, 102, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.badge-expired {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Anti-Print CSS Rule: Blank out entirely when printed */
@media print {
  html, body {
    display: none !important;
    visibility: hidden !important;
  }
}
