/* sharemy.zip — front page
 * Refined-minimal redesign. Keeps the original green (#4caf50) accent on a
 * soft light ground. Styles the uploader, live progress bar, result card,
 * and the existing footer.php (.centered-note) + dl.php tables.
 */

:root {
    --green:      #4caf50;
    --green-dark: #3d9142;
    --green-tint: #eef7ef;
    --ink:        #1d241f;
    --muted:      #76817a;
    --line:       #e6eae6;
    --card:       #ffffff;
    --bg:         #eef1ee;
    --radius:     16px;
    --shadow:     0 1px 2px rgba(29,36,31,.04), 0 12px 40px -12px rgba(29,36,31,.18);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    padding: 48px 20px 40px;
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    background-image:
        radial-gradient(60% 50% at 50% -10%, rgba(76,175,80,.16), transparent 70%),
        radial-gradient(40% 40% at 90% 110%, rgba(76,175,80,.10), transparent 70%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* ---------- card ---------- */
.container {
    width: 100%;
    max-width: 540px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 36px 32px;
    position: relative;
    overflow: hidden;
    animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
}
.container::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--green), #7bd17f);
}
.container.dragging {
    border-color: var(--green);
    box-shadow: var(--shadow), 0 0 0 4px var(--green-tint);
}

/* ---------- masthead ---------- */
.masthead { text-align: center; margin-bottom: 26px; }
.logo-link { display: inline-block; }
.logo {
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}
.tagline {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    letter-spacing: .2px;
}

/* ---------- dropzone ---------- */
.dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 30px 20px;
    border: 1.5px dashed #cdd6cd;
    border-radius: 12px;
    background: #fbfdfb;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background .2s, transform .2s;
}
.dropzone-label:hover { border-color: var(--green); background: var(--green-tint); }
.container.dragging .dropzone-label {
    border-color: var(--green);
    background: var(--green-tint);
    transform: scale(.99);
}
.dropzone-icon {
    width: 34px; height: 34px;
    fill: none;
    stroke: var(--green);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 4px;
}
.dropzone-title {
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--ink);
}
.dropzone-hint { font-size: 12.5px; color: var(--muted); }
#fileToUpload { display: none; }

/* ---------- upload button ---------- */
.button {
    display: block;
    width: 100%;
    margin: 18px 0 0;
    padding: 14px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .3px;
    color: #fff;
    background: var(--green);
    border: none;
    border-radius: 11px;
    cursor: pointer;
    transition: background .2s, transform .08s, box-shadow .2s;
    box-shadow: 0 6px 16px -6px rgba(76,175,80,.6);
}
.button:hover { background: var(--green-dark); box-shadow: 0 10px 22px -8px rgba(76,175,80,.7); }
.button:active { transform: translateY(1px); }

/* ---------- note ---------- */
.note {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.7;
}
.note .types {
    display: block;
    font-family: "JetBrains Mono", monospace;
    letter-spacing: .5px;
    color: #5a665d;
}
.note .sep { display: block; font-size: 11.5px; }

/* ---------- results: progress + link ---------- */
#uploadResult { margin-top: 6px; }
.upload-item {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fbfdfb;
    animation: rise .4s ease both;
}
.prog-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}
.prog-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.prog-pct {
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
    color: var(--green-dark);
    flex-shrink: 0;
}
.prog-track {
    height: 8px;
    border-radius: 999px;
    background: #e7ece7;
    overflow: hidden;
}
.prog-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), #7bd17f);
    transition: width .2s ease;
}
.prog-meta {
    margin-top: 7px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11.5px;
    color: var(--muted);
}
.generating-link-text {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    gap: 7px;
}
.generating-link-text::before {
    content: "";
    width: 13px; height: 13px;
    border: 2px solid var(--green);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

/* the finished link card */
.link-card {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.link-input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 12.5px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
}
.link-input:focus { outline: none; border-color: var(--green); }
.copy-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: var(--green);
    border: none;
    border-radius: 9px;
    cursor: pointer;
    transition: background .2s;
}
.copy-button:hover { background: var(--green-dark); }
.copy-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.copy-button.copied { background: var(--green-dark); }
.upload-error {
    margin-top: 10px;
    font-size: 12.5px;
    color: #c0392b;
}
.open-link {
    display: block;
    margin-top: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    text-decoration: none;
}
.open-link:hover { color: var(--green-dark); text-decoration: underline; }

/* ---------- footer (footer.php .centered-note) ---------- */
.centered-note {
    max-width: 540px;
    text-align: center;
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
}
.centered-note b { color: #5a665d; font-weight: 600; }
.centered-note a { color: var(--green); text-decoration: none; }
.centered-note a:hover { text-decoration: underline; }

/* ---------- dl.php tables / archive viewer (kept usable) ---------- */
.data-table {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
    border-collapse: collapse;
    font-size: 13px;
    background: var(--card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.data-table th, .data-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { background: var(--green-tint); color: #5a665d; font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }
.centered { text-align: center; }
h4 { color: var(--green); }
.code-box { background: #fbfdfb; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 16px; }
.link { color: var(--green); text-decoration: none; }
.link:hover { text-decoration: underline; }
.archive-container {
    max-height: 300px; overflow-y: auto; overflow-x: hidden;
    border: 1px solid var(--line); border-radius: 10px;
    padding: 12px; margin-bottom: 10px; background: #fbfdfb;
    width: 100%; box-sizing: border-box;
}
#archive-contents { font-family: "JetBrains Mono", monospace; white-space: pre-wrap; word-wrap: break-word; margin: 0; font-size: 13px; line-height: 1.5; }
#show-more-button {
    display: inline-block; width: 22px; height: 22px; line-height: 22px;
    text-align: center; background: var(--green-tint); border: 1px solid var(--line);
    border-radius: 50%; cursor: pointer; color: var(--green-dark);
}

/* ---------- download page (dl.php) ---------- */
.file-title {
    margin: 22px 0 20px;
    text-align: center;
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 700;
    font-size: 21px;
    line-height: 1.25;
    color: var(--ink);
    word-break: break-word;
}
.meta {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fbfdfb;
}
.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
}
.meta-row:last-child { border-bottom: none; }
.meta-row dt {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
}
.meta-row dd {
    margin: 0;
    text-align: right;
    font-size: 14px;
    color: var(--ink);
    word-break: break-word;
}
.meta-row dd.mono {
    font-family: "JetBrains Mono", monospace;
    font-size: 13px;
}
.meta-row dd.hash { font-size: 11.5px; color: #5a665d; }
.vscan { font-size: 13.5px; }
.vscan font { font-weight: 600; }

/* full-width rows: label on top, content below */
.meta-row--full { flex-direction: column; align-items: stretch; gap: 10px; }
.meta-row--full dd { text-align: left; width: 100%; }
.copy-row { display: flex; gap: 8px; align-items: stretch; }

.dl-button { margin-top: 22px; }
.back-link {
    display: block;
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--green);
    text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.expired {
    margin: 30px 0 8px;
    text-align: center;
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 700;
    font-size: 19px;
    color: var(--ink);
}
.expired span { display: block; margin-top: 6px; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 400; font-size: 13.5px; color: var(--muted); }

/* archive viewer inside a meta row */
.meta-row--full .archive-container { margin-bottom: 8px; }
#show-more-container { text-align: center; cursor: pointer; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* ---------- responsive ---------- */
@media (max-width: 560px) {
    body { padding: 28px 14px 28px; }
    .container { padding: 30px 22px 26px; }
    .logo { max-width: 180px; }
    .link-card { flex-direction: column; }
    .copy-button { padding: 11px; justify-content: center; }
}
