/* ==========================================================================
   Secret — Styles
   Edit the variables below to customise colours, type, and spacing.
   ========================================================================== */

:root {
  /* Colours */
  --color-bg:            #ffffff;
  --color-text:          #374151;
  --color-text-light:    #9ca3af;
  --color-text-error:    #ef4444;
  --color-text-success:  #4ade80;
  --color-border:        #d1d5db;
  --color-input-bg:      #f3f4f6;
  --color-input-focus:   #ffffff;
  --color-button-bg:     transparent;
  --color-button-hover:  #f3f4f6;
  --color-button-border: #374151;
  --color-highlight:     yellow;
  --color-download-bg:   #374151;
  --color-download-text: #ffffff;
  --color-radio-border:  black;
  --color-radio-checked: black;
  --color-tab-active:    #374151;
  --color-tab-inactive:  #9ca3af;
  --color-progress-bg:   #e5e7eb;
  --color-progress-fill: #374151;

  /* Typography */
  --font-family:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-sm:   0.875rem;
  --font-size-xs:   0.75rem;
  --line-height:    1.5;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;

  /* Layout */
  --max-width:     42rem;
  --border-radius: 0.25rem;
}


/* === Base === */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
}

a        { color: inherit; }
img { 
    max-width: 300px; 
    display: block; 
    margin-left:auto; 
    margin-right: auto;
}
h1, h2, p { margin: 0; }
hr       { border: none; border-top: 1px solid var(--color-border); }


/* === Layout === */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md);
  padding-top: var(--space-xl);
}

.header-img {
  margin-bottom: var(--space-lg);
  height: auto;
}


/* === Form elements === */

textarea,
input[type="text"],
input[type="password"],
select {
  display: block;
  width: 100%;
  padding: 0.75rem var(--space-md);
  font-family: inherit;
  font-size: inherit;
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-input-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  appearance: none;
  -webkit-appearance: none;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  background: var(--color-input-focus);
  border-color: var(--color-text-light);
}

textarea { resize: vertical; min-height: 12rem; }

label {
  display: block;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: var(--space-sm);
}

.form-row {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.form-row > * { flex: 1; min-width: 200px; }

.form-group { margin-bottom: var(--space-lg); }

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  font-style: italic;
  margin-top: var(--space-xs);
}


/* === Radio toggle === */

.toggle-group {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.toggle-group label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}

.toggle-group input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  border: 2px solid var(--color-radio-border);
  border-radius: 50%;
  cursor: pointer;
}

.toggle-group input[type="radio"]:checked {
  border-color: var(--color-radio-checked);
  background: var(--color-radio-checked);
  box-shadow: inset 0 0 0 2.5px var(--color-bg);
}


/* === Buttons === */

.btn {
  display: block;
  width: 100%;
  padding: var(--space-md);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  text-align: center;
  color: var(--color-text);
  background: var(--color-button-bg);
  border: 3px solid var(--color-button-border);
  border-radius: var(--border-radius);
  cursor: pointer;
}

.btn:hover { background: var(--color-button-hover); }

.btn-download {
  display: inline-block;
  width: auto;
  padding: 0.75rem var(--space-lg);
  color: var(--color-download-text);
  background: var(--color-download-bg);
  border-color: var(--color-download-bg);
  text-decoration: none;
}

.btn-download:hover { opacity: 0.9; }


/* === Drop zone === */

.dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-light);
  cursor: pointer;
}

.dropzone.dragover { border-color: var(--color-text); }

.dropzone input[type="file"] { display: none; }

.file-info   { color: var(--color-text); }
.file-meta   { font-size: var(--font-size-sm); color: var(--color-text-light); }
.file-remove { font-size: var(--font-size-xs); color: var(--color-text-light); cursor: pointer; text-decoration: underline; font-style: italic; }


/* === Secret result / share === */

.result-box {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  background: var(--color-input-bg);
  word-break: break-all;
  cursor: pointer;
  margin-bottom: var(--space-xs);
}

.result-box::selection,
.result-box *::selection { background: var(--color-highlight); }

.copy-hint { font-size: var(--font-size-xs); color: var(--color-text-light); font-style: italic; }

.section-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}


/* === Messages === */

.msg-success { color: var(--color-text-success); }
.msg-error   { color: var(--color-text-error); }

.msg-warning {
  color: var(--color-text-error);
  font-size: var(--font-size-sm);
  font-style: italic;
  text-align: center;
}

.msg-center { text-align: center; }

.delete-link {
  color: var(--color-text-error);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  padding: 0;
}


/* === Secret display (show page) === */

.secret-content {
  background: var(--color-input-bg);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  white-space: pre-wrap;
  word-break: break-word;
}

.secret-content::selection { background: var(--color-highlight); }


/* === Utilities === */

.hidden  { display: none !important; }
.bold    { font-weight: 700; }
.mt-sm   { margin-top: var(--space-sm); }
.mt-md   { margin-top: var(--space-md); }
.mt-lg   { margin-top: var(--space-lg); }
.mt-xl   { margin-top: var(--space-xl); }
.mb-md   { margin-bottom: var(--space-md); }
.mb-lg   { margin-bottom: var(--space-lg); }
.mb-xl   { margin-bottom: var(--space-xl); }


/* === Tabs === */

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.tab {
  padding: var(--space-sm) var(--space-lg);
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--color-tab-inactive);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}

.tab:hover { color: var(--color-text); }

.tab.active {
  color: var(--color-tab-active);
  border-bottom-color: var(--color-tab-active);
}


/* === Progress bar === */

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-progress-bg);
  border-radius: 3px;
  overflow: hidden;
  margin-top: var(--space-sm);
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-progress-fill);
  border-radius: 3px;
  width: 0%;
  transition: width 0.15s ease;
}


/* === Pulse animation (loading) === */

.pulse { animation: pulse 2s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}


/* === 404 === */

.error-image {
  max-width: 28rem;
  margin: var(--space-lg) auto;
}


/* === Footer link === */

.footer-link {
  position: fixed;
  bottom: 0;
  right: 0;
  padding: var(--space-md);
  text-decoration: none;
}
