@import 'variables.css';

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  user-select: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  /* text-align: center; */
}

h1,
h2,
h3 {
  color: var(--text-main);
}

h1 span {
  color: var(--accent);
}

/* Header & Nav */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #333;
  margin-bottom: 40px;
}

header h1 {
  margin: 0;
}

header a {
  text-decoration: none;
}

nav {
  display: flex;
  gap: 10px;
}

/* Common Button Styles */
.btn {
  background: var(--accent);
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: 0.3s;
  font-size: 16px;
  display: inline-block;
}

.btn:hover {
  opacity: 0.8;
  background-color: var(--accent);
}

.btn-secondary {
  background: var(--secondary);
}

/* Inputs */
input[type='text'],
input[type='password'],
textarea {
  /* width: 100%; removed based on user feedback */
  padding: 10px;
  background: #2b2b2b;
  border: 1px solid #444;
  color: white;
  border-radius: 4px;
  box-sizing: border-box;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* --- Share Specific Styles --- */

h1.title {
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

section {
  margin-bottom: 40px;
  text-align: center;
}

textarea {
  text-align: left;
  resize: none;
  height: 300px;
  user-select: text;
  max-height: 75vh;
}

#file-preview {
  border: 2px dashed #444;
  padding: 20px;
  width: 100%;
  max-width: 800px;
  max-height: 75vh;
  margin: 20px auto;
  background: var(--card-bg);
  box-sizing: border-box;
  overflow: auto;
}

#file-preview img,
#file-preview video {
  max-width: 100%;
  height: auto;
}

/* File Upload Area */
#upload-a-file form {
  text-align: center;
}

#input-file {
  width: 100%;
  max-width: 600px;
  border: 2px dashed #444;
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  cursor: pointer;
  background: var(--card-bg);
  transition: 0.3s;
  border-radius: 8px;
  min-height: 200px;
}

#input-file:hover {
  border-color: var(--accent);
}

#input-file.drag-over {
  border-color: var(--accent);
  background: #333;
}

#file-key-input {
  width: 300px;
  max-width: 100%;
  margin-bottom: 10px;
  text-align: center;
}

.key {
  user-select: text;
  text-decoration: underline;
  color: var(--accent);
}

/* QR Code & Modal */
.qr-code {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex !important;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.qr-code img {
  pointer-events: auto;
  filter: none;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 5px solid white;
  max-width: 90vw;
  max-height: 90vh;
}

.hidden {
  display: none !important;
}

.blur {
  filter: blur(5px) brightness(0.4);
}

.dark-bg {
  overflow: hidden;
}

div#main {
  text-align: center;
}
