/* keyslip styles - extracted from base.html */

:root {
    /* Mint palette inspired by elbkapitaene.de */
    --mint-100: #f0fdf4;
    --mint-200: #dcfce7;
    --mint-300: #bbf7d0;
    --mint-400: #86efac;
    --mint-500: #4ade80;
    --mint-gradient-start: #a7f3d0;
    --mint-gradient-mid: #6ee7b7;
    --mint-gradient-end: #d9f99d;

    /* Surfaces */
    --surface-elevated: #f8fafc;
    --surface-muted: #f1f5f9;

    /* Text */
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Accent - warm coral for CTAs */
    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-muted: rgba(249, 115, 22, 0.1);

    /* States */
    --success: #10b981;
    --success-muted: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-muted: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --warning-muted: rgba(245, 158, 11, 0.1);

    /* Borders */
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    /* Typography */
    --font-display: 'Gilroy', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Gilroy', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-handwritten: 'Smooch', cursive;

    /* Motion */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background: #ffffff;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Mint gradient hero background */
.hero-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70vh;
    background: linear-gradient(
        135deg,
        var(--mint-gradient-start) 0%,
        var(--mint-gradient-mid) 40%,
        var(--mint-gradient-end) 100%
    );
    z-index: 0;
    pointer-events: none;
}

/* Simple gradient fade to white */
.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        #ffffff 100%
    );
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Buttons reset */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Inputs reset */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* ===== LAYOUT ===== */
.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 var(--space-5);
    position: relative;
    z-index: 10;
}

.container--wide {
    max-width: 1000px;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.header {
    padding: var(--space-5) 0;
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: opacity var(--duration-fast) ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo svg {
    height: 32px;
    width: auto;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.user-email {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-logout {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.btn-logout:hover {
    color: var(--text);
    background: var(--surface-muted);
}

/* ===== MAIN ===== */
.main {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ===== TYPOGRAPHY ===== */
.display {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.display--accent {
    color: var(--accent);
}

.title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
}

.label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* ===== CARDS ===== */
.card {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.card--elevated {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.card form {
    width: 100%;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    width: 100%;
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.form-input {
    width: 100%;
    padding: var(--space-4);
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 1rem;
    transition: all var(--duration-fast) ease;
}

.form-input:hover {
    border-color: var(--border-strong);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-7);
    cursor: pointer;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--duration-normal) var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--text);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-muted);
    border-color: var(--border-strong);
}

.btn-ghost {
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-3);
}

.btn-ghost:hover {
    color: var(--text);
    background: var(--surface-muted);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== FIELD ROWS ===== */
.field-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    align-items: start;
}

.btn-remove-field {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.btn-remove-field:hover {
    color: var(--danger);
    background: var(--danger-muted);
}

.btn-add-field {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    padding: var(--space-2) 0;
    transition: color var(--duration-fast) ease;
}

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

/* ===== MODE TOGGLE ===== */
.mode-toggle {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-1);
    background: var(--surface-muted);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}

.mode-toggle-btn {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) ease;
}

.mode-toggle-btn:hover {
    color: var(--text-secondary);
}

.mode-toggle-btn--active {
    background: #ffffff;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ===== FORM CONTENT ===== */
.form-content {
    min-height: 200px;
    min-width: 100%;
}

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-4) 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ===== SECRET RESULT ===== */
.secret-result {
    animation: fadeSlideUp 0.6s var(--ease-out-expo);
}

.result-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.result-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto var(--space-4);
    background: var(--success-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.4s var(--ease-spring) 0.2s backwards;
}

.result-icon svg {
    width: 36px;
    height: 36px;
    color: var(--success);
}

.secret-url {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.secret-url-text {
    flex: 1;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.875rem;
    color: var(--accent);
    word-break: break-all;
}

.secret-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== ALERTS ===== */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert-warning {
    background: var(--warning-muted);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-warning .alert-icon {
    color: var(--warning);
}

.alert-success {
    background: var(--success-muted);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-success .alert-icon {
    color: var(--success);
}

.alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.alert-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* ===== SECRET FIELDS ===== */
.secret-field {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-3);
    transition: border-color var(--duration-fast) ease;
}

.secret-field:hover {
    border-color: var(--border-strong);
}

.secret-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.secret-field-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.secret-field-actions {
    display: flex;
    gap: 2px;
}

.secret-field-value {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 1rem;
    color: var(--text);
    word-break: break-all;
    line-height: 1.5;
}

.secret-field-value.masked {
    color: var(--text-muted);
    letter-spacing: 0.15em;
}

/* ===== REVEAL BUTTON ===== */
.reveal-container {
    text-align: center;
    padding: var(--space-6) 0;
}

.btn-reveal {
    padding: var(--space-5) var(--space-8);
    font-size: 1.125rem;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    background: var(--text);
    color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.2);
    transition: all var(--duration-normal) var(--ease-out-expo);
}

.btn-reveal:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}

/* ===== GONE STATE ===== */
.gone-state {
    text-align: center;
    padding: var(--space-9) var(--space-5);
}

.gone-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto var(--space-5);
    background: var(--surface-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.gone-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.gone-text {
    color: var(--text-secondary);
    max-width: 380px;
    margin: 0 auto;
}

/* ===== COPY FEEDBACK ===== */
.copy-feedback {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: #ffffff;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
    opacity: 0;
    transition: all var(--duration-normal) var(--ease-out-expo);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.2);
}

.copy-feedback.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ===== FOOTER ===== */
.footer {
    padding: var(--space-6) 0;
    position: relative;
    z-index: 10;
    margin-top: auto;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

.footer-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--duration-fast) ease;
}

.footer-link:hover {
    color: var(--accent);
}

/* ===== FEATURES GRID ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin-top: var(--space-7);
    margin-bottom: var(--space-8);
}

.feature-card {
    padding: var(--space-5);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--duration-normal) ease;
}

.feature-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--mint-200);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
    color: var(--text);
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.feature-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    background: #ffffff;
    padding: var(--space-8) 0 var(--space-9);
    position: relative;
    z-index: 5;
}

.steps-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    counter-reset: step-counter;
}

.step {
    text-align: center;
    flex: 1;
    max-width: 280px;
    counter-increment: step-counter;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--text);
    border-radius: 50%;
    margin: 0 auto var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.step-number::before {
    content: counter(step-counter);
}

.step-text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-in {
    animation: fadeSlideUp 0.6s var(--ease-out-expo) forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ===== LOADING SPINNER ===== */
.spinner {
    animation: spin 1s linear infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    :root {
        --space-5: 20px;
        --space-6: 28px;
        --space-7: 40px;
        --space-8: 56px;
    }

    .display {
        font-size: 2rem;
    }

    .card {
        padding: var(--space-5);
        border-radius: var(--radius-lg);
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .field-row .form-input:first-child {
        margin-bottom: var(--space-2);
    }

    .btn-remove-field {
        justify-self: end;
    }

    .user-email {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
        gap: var(--space-6);
    }

    .step {
        max-width: 100%;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* ===== SELECTION ===== */
::selection {
    background: var(--mint-400);
    color: var(--text);
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== SECURITY BADGE ===== */
.security-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.security-badge svg {
    color: var(--success);
}
