/* reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
  background: linear-gradient(145deg, #f6f9fc 0%, #edf2f7 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  max-width: 700px;
  width: 100%;
  padding: 2.2rem 2rem;
  border-radius: 32px;
  box-shadow: 0 20px 35px -8px rgba(0, 27, 48, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: all 0.2s;
}

h1 {
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0b3b5c;
  margin-bottom: 0.2rem;
}

.subhead {
  color: #3a5e6e;
  font-size: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #d8e2ed;
  padding-bottom: 0.9rem;
}

/* DROPZONE */
.dropzone {
  border: 2px dashed #9cb3c9;
  border-radius: 24px;
  background: #f9fcff;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 1.2rem;
}

.dropzone:hover {
  background: #ecf3fa;
  border-color: #3a7ca5;
}

.dropzone.dragover {
  background: #dde9f5;
  border-color: #1a5f7a;
  border-style: solid;
}

.drop-content .icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.drop-content p {
  color: #1f3e4b;
  margin: 0.2rem 0;
}

.text-btn {
  background: none;
  border: none;
  color: #0d5b7a;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.2rem;
}

.text-btn:hover {
  color: #083c4f;
}

.hint {
  font-size: 0.8rem;
  color: #5a7e8b;
  margin-top: 0.5rem;
}

/* FILE INFO + RESET */
.file-info {
  background: #e4edf2;
  border-radius: 40px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  color: #0a3140;
  display: inline-block;
  margin-right: 0.8rem;
  word-break: break-word;
  max-width: 80%;
}

.reset-btn {
  background: transparent;
  border: 1px solid #b0c8d2;
  color: #2c4e5e;
  padding: 0.4rem 1.2rem;
  border-radius: 40px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 0.25rem;
  float: right;
}

.reset-btn:hover {
  background: #e1e9ef;
  border-color: #7f9aa5;
  color: #001f2b;
}

/* PASSWORD SECTION */
#passwordSection {
  margin-top: 1.8rem;
  clear: both;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f5063;
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}

.password-wrapper {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

#password {
  flex: 1 1 200px;
  padding: 0.75rem 1.2rem;
  border: 1px solid #b8d0da;
  border-radius: 50px;
  font-size: 1rem;
  background: white;
  transition: 0.15s;
  outline: none;
}

#password:focus {
  border-color: #1f7c9c;
  box-shadow: 0 0 0 3px rgba(31, 124, 156, 0.1);
}

.primary-btn {
  background: #0e6b7c;
  border: none;
  color: white;
  padding: 0.75rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  border: 1px solid #085461;
}

.primary-btn:hover {
  background: #0a4e5c;
  transform: scale(0.98);
}

/* DOWNLOAD BUTTON */
.download-btn {
  background: #1d7640;
  border: none;
  color: white;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
  margin-top: 1.8rem;
  transition: background 0.15s;
  border: 1px solid #0e522a;
}

.download-btn:hover {
  background: #155e33;
}

/* MESSAGE AREA */
.message {
  margin-top: 1.8rem;
  padding: 0.8rem 1.2rem;
  border-radius: 40px;
  font-size: 0.9rem;
  background: #f1f7fa;
  color: #1a4452;
  border-left: 5px solid #568ea1;
}

.message.error {
  background: #ffecf0;
  color: #a13e4a;
  border-left-color: #c35363;
}

.message.success {
  background: #e1f2e9;
  color: #1a5a3a;
  border-left-color: #2a8e5c;
}

/* TRUST NOTE */
.trust-note {
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed #bbd1da;
  font-size: 0.8rem;
  color: #4c6f7c;
  text-align: center;
  font-weight: 400;
}

/* responsive */
@media (max-width: 500px) {
  .card { padding: 1.5rem; }
  h1 { font-size: 1.6rem; }
  .password-wrapper { flex-direction: column; }
  .primary-btn { width: 100%; }
}