/* ShareLinkWiz design system — dark-mode-first, Linear/Vercel register. */

@font-face {
    font-family: 'InterVariable';
    src: url('../fonts/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono Variable';
    src: url('../fonts/JetBrainsMono-Variable.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0b0e14;
    --surface: #131722;
    --surface-alt: #1a1f2e;
    --border: #232838;
    --text: #e7e9ee;
    --text-muted: #9ca3b5;
    --accent: #7c5cff;
    --accent-hover: #9177ff;
    --accent-contrast: #ffffff;
    --success: #2dd4bf;
    --warning: #f5a524;
    --danger: #f5455c;
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --font-sans: 'InterVariable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono Variable', ui-monospace, 'SFMono-Regular', Consolas, monospace;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: radial-gradient(circle at 20% -10%, #1c1440 0%, var(--bg) 45%) fixed;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

h1, h2, h3, h4 {
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
}

p {
    margin: 0 0 1em;
    color: var(--text-muted);
}

code, .mono {
    font-family: var(--font-mono);
    font-feature-settings: 'zero' 1;
    /* Fallback for anywhere a full, untruncated link/value is shown as text — wraps cleanly
       instead of overflowing its container. */
    word-break: break-all;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Nav */

.nav {
    border-bottom: 1px solid var(--border);
    background: rgba(11, 14, 20, 0.7);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 14.5px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--text);
}

/* Logo */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    color: var(--text);
}

.logo-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14.5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(180deg, var(--accent-hover), var(--accent));
    color: var(--accent-contrast);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 8px 24px -8px rgba(124, 92, 255, 0.6);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--surface-alt);
    color: var(--text);
    border-color: var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: rgba(245, 69, 92, 0.4);
}

.btn-block {
    width: 100%;
}

/* Cards */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.card-tight {
    padding: 20px 24px;
}

/* Forms */

label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 16px;
    transition: border-color 0.15s ease;
}

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

.field-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.field-row input {
    margin-bottom: 10px;
}

/* Vault's create-form field rows only (#field-list is unique to that form — quiz's option rows
   use a different container id, so this never affects quiz's layout). Top clearance for the
   floating generate-password icon, which sits just above each value field. */
#field-list .field-row {
    margin-top: 26px;
}

.field-label-input {
    flex: 1;
    min-width: 0;
}

.field-value-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.field-generate-btn {
    position: absolute;
    top: -22px;
    right: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 2px 4px;
}

.field-generate-btn:hover {
    color: var(--accent);
}

/* Alerts / badges */

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-error {
    background: rgba(245, 69, 92, 0.08);
    border-color: rgba(245, 69, 92, 0.35);
    color: #ffb4c0;
}

.alert-success {
    background: rgba(45, 212, 191, 0.08);
    border-color: rgba(45, 212, 191, 0.35);
    color: #a8f3e8;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.badge-active { background: rgba(45, 212, 191, 0.12); color: var(--success); }
.badge-viewed { background: rgba(156, 163, 181, 0.15); color: var(--text-muted); }
.badge-expired { background: rgba(245, 165, 36, 0.12); color: var(--warning); }
.badge-locked { background: rgba(245, 69, 92, 0.12); color: var(--danger); }

/* Footer */

.footer {
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13.5px;
    padding: 40px 0;
    margin-top: 80px;
}

.footer a {
    color: var(--text-muted);
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
