:root {
    --border-radius: 30px;
    --border-width: 6px;
    --header-offset: 88px;
}
@media (max-width: 1000px) { :root { --border-width: 4px; } }
@media (max-width: 600px) { :root { --border-width: 2px; } }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { line-height: 1.15; -webkit-text-size-adjust: 100%; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #000;
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

a { color: #000; text-decoration: underline; text-underline-position: under; transition: all 0.15s ease-in-out; }
a:hover { background-color: #000; color: #fff; }

.hidden { display: none !important; }

/* ===== HEADER ===== */
.site-header {
    position: relative;
    width: 100%;
    color: #fff;
}

.logo-area {
    position: relative;
    background-color: #30D40A;
    border-bottom-right-radius: var(--border-radius);
    padding: 0;
    display: inline-block;
}

.logo-area a.logo {
    display: block;
    padding: 1.5rem 2.5rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.logo-area a.logo:hover {
    background: transparent;
    transform: scale(1.05);
}

.logo-area a.logo img,
.logo-area a.logo svg {
    height: 40px;
    width: auto;
    display: block;
}

/* ===== PAGE CONTENT ===== */
.page-content {
    flex: 1;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    min-height: calc(100dvh - var(--header-offset));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1rem, 2.2vh, 2rem) 3vw;
}

.page-title {
    margin-bottom: clamp(0.9rem, 1.8vh, 1.6rem);
}

.page-title h1 {
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 700;
    font-size: 32px;
    line-height: 1.2;
    color: #000;
}

@media (min-width: 400px) {
    .page-title h1 { font-size: calc(32px + 12 * (100vw - 400px) / 1000); }
}
@media (min-width: 1400px) {
    .page-title h1 { font-size: 44px; }
}

.page-title h1 .accent { color: #30D40A; }

.page-title p {
    margin-top: 0.5rem;
    color: #000;
    font-weight: 300;
}

/* ===== FORM CARD (teaserbox style) ===== */
.form-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 0 0.2rem 0.2rem rgba(0, 0, 0, 0.1);
    padding: clamp(1.2rem, 2.5vh, 1.8rem) 1.5rem;
    margin-bottom: clamp(0.75rem, 1.8vh, 1.25rem);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border: 1px solid #ADB5B9;
    border-radius: 10px;
    overflow: hidden;
}

.tab {
    flex: 1;
    padding: 10px 16px 8px;
    background: #fff;
    border: none;
    color: #000;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    transition: all 0.15s ease-in-out;
    border-right: 1px solid #ADB5B9;
}

.tab:last-child { border-right: none; }

.tab.active {
    background: #30D40A;
    color: #fff;
    font-weight: 700;
}

.tab:hover:not(.active) {
    background: #f5f5f5;
}

.tab svg { margin-right: 6px; vertical-align: -0.125em; }

#input-text,
#input-file,
#input-password {
    margin-bottom: 0.9rem;
}

.password-generator {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.password-generator-actions {
    display: flex;
    gap: 0.75rem;
}

.password-generator-actions .button {
    flex: 1;
    margin-top: 0;
    text-align: center;
}

/* ===== FORM ELEMENTS (exact match) ===== */
textarea,
input[type="password"],
input[type="text"] {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 300;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    outline: none;
    background-color: #fff;
    color: #000;
    border: 1px solid #ADB5B9;
    padding: 9px 10px 7px;
    border-radius: 10px;
}

textarea {
    min-height: clamp(84px, 13vh, 124px);
    max-height: 22vh;
    resize: none;
    overflow: auto;
    line-height: 1.45;
    display: block;
}

textarea::placeholder,
input::placeholder { color: #ADB5B9; }

textarea:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: rgb(118, 131, 138);
}

select {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    font-weight: 300;
    width: 100%;
    appearance: none;
    border: 1px solid #ADB5B9;
    padding: 9px 35px 7px 10px;
    border-radius: 10px;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ADB5B9' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
}

select:focus { border-color: rgb(118, 131, 138); }

/* ===== FILE DROP ===== */
.file-drop {
    border: 2px dashed #ADB5B9;
    border-radius: 10px;
    padding: clamp(0.9rem, 2vh, 1.4rem) 1rem;
    text-align: center;
    color: #000;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.file-drop:hover, .file-drop.dragover {
    border-color: #30D40A;
    background: rgba(48, 212, 10, 0.03);
}

.file-drop .icon { font-size: 1.6rem; margin-bottom: 0.35rem; color: #ADB5B9; }
.file-drop input[type="file"] { display: none; }

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f5f5f5;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-top: 0.75rem;
}
.file-info .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.file-info .size { color: #ADB5B9; font-size: 0.85rem; }
.file-info .remove { color: red; cursor: pointer; font-size: 1.1rem; background: none; border: none; padding: 0.25rem; }

/* ===== OPTIONS ===== */
.options { margin-top: 0.85rem; display: flex; flex-direction: column; gap: 0.6rem; }
.option-row { display: flex; align-items: center; gap: 0.75rem; }
.option-row label { font-size: 15px; color: #000; font-weight: 400; min-width: 80px; }

/* ===== BUTTONS (exact IT Risch) ===== */
.button {
    line-height: 1.35;
    font-weight: 700;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
    display: inline-block;
    border: 2px solid #fff;
    border-radius: 10px;
    user-select: none;
    cursor: pointer;
    text-align: left;
    text-transform: uppercase;
    background-color: #30D40A;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px 10px;
    margin-top: 0.75rem;
    letter-spacing: 1px;
    box-shadow: 0 2px 0.7rem 0.1rem rgba(0, 0, 0, 0.2);
    transition: all 0.15s ease-in-out;
    font-size: 16px;
}
@media (min-width: 400px) {
    .button { font-size: calc(16px + 4 * (100vw - 400px) / 1000); }
}
@media (min-width: 1400px) {
    .button { font-size: 20px; }
}

.button:hover {
    border-color: #30D40A;
    background-color: #fff;
    color: #30D40A;
    text-decoration: none;
}

.button:disabled { opacity: 0.5; cursor: not-allowed; }
.button:disabled:hover { background-color: #30D40A; color: #fff; border-color: #fff; }

.button.full-width { width: 100%; text-align: center; }

.button.button-danger {
    background-color: #c00;
    border-color: #c00;
}
.button.button-danger:hover {
    background-color: #fff;
    color: #c00;
    border-color: #c00;
}

.button.button-outline {
    background-color: #fff;
    color: #000;
    border-color: #ADB5B9;
    box-shadow: none;
}
.button.button-outline:hover {
    border-color: #30D40A;
    color: #30D40A;
}

.button.button-inline {
    width: auto;
    min-width: 140px;
    margin-top: 0;
    flex: 0 0 auto;
}

.button svg { margin-right: 6px; vertical-align: -0.125em; }

/* ===== RESULT BOX ===== */
.result-box {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 12px 14px;
    word-break: break-all;
    font-family: 'SF Mono', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #ADB5B9;
    color: #000;
    transition: border-color 0.15s;
}
.result-box:hover { border-color: #30D40A; }

.copy-hint { font-size: 13px; color: #ADB5B9; text-align: center; margin-top: 0.4rem; }

/* ===== SECRET TEXT ===== */
.secret-text {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 16px;
    border: 1px solid #ADB5B9;
    max-height: 400px;
    overflow-y: auto;
}

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-warn { background: rgba(255,0,0,0.08); color: #c00; }
.badge-info { background: rgba(48, 212, 10, 0.1); color: #1a8f00; }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 400; margin-bottom: 0.9rem; }
.alert-warning { background: rgba(255,0,0,0.06); border: 1px solid rgba(255,0,0,0.2); color: #900; }
.alert-success { background: rgba(48,212,10,0.06); border: 1px solid rgba(48,212,10,0.3); color: #1a8f00; }
.alert svg { margin-right: 6px; vertical-align: -0.125em; }

/* ===== SPINNER ===== */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SECURITY INFO ===== */
.security-info { padding: 0.15rem 0; color: #ADB5B9; font-size: 12px; font-weight: 400; line-height: 1.45; }
.security-info strong { color: #000; font-weight: 700; }

/* ===== PW PROMPT ===== */
.pw-prompt { margin-bottom: 1rem; }
.pw-prompt input { width: 100%; margin-bottom: 0.5rem; }

/* Inline-style replacements (CSP-friendly) */
.password-input { flex: 1; }
.expires-select { flex: 1; }
.file-drop-hint { font-size: 12px; margin-top: 0.2rem; color: #ADB5B9; }
.btn-spacer { margin-top: 0.5rem; }
.alert-spacer { margin-top: 1rem; }
.content-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.file-info-revealed { margin-top: 0; }
.file-list { margin-top: 0.75rem; }

@media (max-width: 600px) {
    :root { --header-offset: 76px; }
    .page-content {
        min-height: calc(100dvh - var(--header-offset));
        justify-content: flex-start;
        padding: 1rem 5vw 1.25rem;
    }
    .form-card { padding: 1.1rem 1rem; border-radius: 20px; }
    .password-generator-actions { flex-direction: column; }
    .option-row { gap: 0.5rem; }
    .option-row label { min-width: 68px; font-size: 14px; }
    .button { display: block; text-align: center; padding: 10px 16px 8px; }
    textarea { min-height: 96px; max-height: 18vh; }
    .file-drop { padding: 0.9rem 0.85rem; }
}
