body { 
  font-family: Arial, sans-serif; 
  max-width: 800px; 
  margin: 0 auto; 
  padding: 20px;
  background: #f5f5f5;
}

.container { 
  background: white; 
  padding: 30px; 
  border-radius: 8px; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Fix footer layout regression */
footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
  font-size: 0.9em;
  color: #666;
  line-height: 1.6;
  background: transparent;
}

footer .link {
  color: #007cba;
  text-decoration: none;
}

footer .link:hover {
  text-decoration: underline;
}

.footer-note {
  margin-top: 10px;
  font-size: 0.9em;
  color: #666;
}

textarea { 
  width: 100%; 
  height: 150px; 
  margin: 10px 0; 
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: monospace;
  box-sizing: border-box;
}

button { 
  background: #007cba; 
  color: white; 
  border: none; 
  padding: 12px 24px; 
  border-radius: 4px; 
  cursor: pointer;
  font-size: 16px;
}

button:hover { background: #005a8b; }
button:disabled { background: #ccc; cursor: not-allowed; }

.url-display { 
  background: #e8f4f8; 
  padding: 15px; 
  border-radius: 4px; 
  margin: 15px 0;
  word-break: break-all;
  font-family: monospace;
}

.warning {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 15px;
  border-radius: 4px;
  margin: 15px 0;
}

.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px;
  border-radius: 4px;
  margin: 15px 0;
}

.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 15px;
  border-radius: 4px;
  margin: 15px 0;
}

/* Modal styles */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 6px;
  width: 300px;
  text-align: center;
}

.modal-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: space-around;
}

.modal-buttons button {
  width: 100px;
}

#passwordRetryMessage {
  font-size: 0.9em;
  color: red;
  min-height: 1.2em;
  margin-top: 10px;
}

#passwordMinLengthNotice {
  font-size: 0.9em;
  color: #555;
  margin-top: 6px;
}

/* =========================
   Password Strength Meter
   ========================= */
.pw-strength-wrap {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pw-strength-bar {
  height: 6px;
  flex: 1;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.pw-strength-fill {
  height: 100%;
  width: 0%;
  background: #9ca3af;
  transition: width 160ms ease, background 160ms ease;
}

.pw-strength-label {
  min-width: 72px;
  font-size: 12px;
  font-weight: bold;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  text-align: left;
}

/* Label colors */
.pw-strength-label.weak      { color: #ef4444; }
.pw-strength-label.fair      { color: #f59e0b; }
.pw-strength-label.good      { color: #eab308; }
.pw-strength-label.strong    { color: #22c55e; }
.pw-strength-label.excellent { color: #14b8a6; }

/* =========================
   Password Input + Toggle
   ========================= */
.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field input {
  width: 100%;
  padding-right: 40px;
  box-sizing: border-box;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  opacity: 0.8;
  padding: 0;
  color: #333;
}

.password-toggle:hover { opacity: 1; }
.password-toggle.on { opacity: 1; }

.password-toggle svg { display: block; }
.password-toggle path,
.password-toggle circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hide native reveal UI */
.password-field input::-ms-reveal,
.password-field input::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}
.password-field input::-webkit-credentials-auto-fill-button,
.password-field input::-webkit-clear-button,
.password-field input::-webkit-inner-spin-button,
.password-field input::-webkit-contacts-auto-fill-button {
  display: none !important;
  visibility: hidden;
}
.password-field input::-webkit-textfield-decoration-container {
  visibility: hidden;
}

/* Subtext + file controls */
.subtext {
  font-size: 0.9em;
  color: #555;
  margin-top: 6px;
  text-align: center;
}

.file-attach {
  margin-top: 1em;
}

.file-attach input[type="file"] {
  margin-top: 0.5em;
}

#fileUploadProgress {
  display: none;
  width: 100%;
  height: 10px;
  margin-top: 0.4em;
}

#fileStatus {
  color: #555;
  margin-top: 0.3em;
  font-size: 0.9em;
}

.file-download {
  margin-top: 1.5em;
}

.file-download .file-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5em;
}

#downloadProgress {
  display: none;
  width: 100%;
  height: 10px;
  margin-bottom: 0.5em;
}

.hidden {
  display: none;
}

.note-content {
  white-space: pre-wrap;
}
/* ===================================
   Layout for Create Section Controls
   =================================== */

.top-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.file-attach {
  flex: 1;
  min-width: 220px;
}

.file-attach input[type="file"] {
  margin-top: 0.5em;
}

#fileUploadProgress {
  width: 100%;
  height: 10px;
  margin-top: 0.4em;
  display: none;
}

.expiry-control {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
}

.expiry-control select {
  margin-top: 4px;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  font-size: 14px;
}

.controls {
  text-align: center;
  margin-top: 15px;
}

#noteText {
  margin-top: 15px;
}

/* Make sure it's responsive */
@media (max-width: 600px) {
  .top-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .expiry-control {
    align-items: flex-start;
  }
}
