:root {
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --danger: #dc2626;
    --link: #0000ff;
    --btn-hover: #f1f5f9;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        system-ui,
        sans-serif;
}

.container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 30px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.card {
    background: var(--card);

    border: 1px solid var(--border);
    border-radius: 14px;

    padding: 20px;

    margin-bottom: 20px;
}

#drop-zone {
    border: 2px dashed var(--border);
    border-radius: 14px;

    padding: 60px 20px;

    text-align: center;

    transition: .2s;
}

#drop-zone.dragover {
    border-color: var(--primary);
    background: #eff6ff;
}

#file-input {
    display: none;
}

/* .file { */
    /* display: flex; */
    /* justify-content: space-between; */
    /* align-items: center; */

    /* padding: 16px 0; */

    /* border-bottom: 1px solid var(--border); */
/* } */

/* .file:last-child { */
    /* border-bottom: none; */
/* } */

/* .file-name { */
    /* font-weight: 600; */
/* } */

/* .file-meta { */
    /* color: var(--muted); */
    /* font-size: 14px; */
/* } */

.file {
    padding: 16px 0;
    transition: background-color .15s ease;
    border-bottom: 1px solid var(--border);
}

.file.noborder {
    border-bottom: 0;
}

.file:hover {
    background: rgba(0,0,0,.02);
}

.file.nohover:hover {
    background: transparent;
}

.file-name {
    font-weight: 600;
    margin-bottom: 1rem;
}

.file-main {
    width: 100%;
}

.file-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.share-list {
    margin-top: 12px;
    padding-top: 12px;
    /* border-top: 1px solid var(--border); */
}

.share-row {
    display: flex;
    /* justify-content: space-between; */
    gap: 12px;
    align-items: center;

    padding: 8px 0;

    font-size: 14px;
}

.share-row a {
    color: var(--primary);
    word-break: break-all;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 14px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--card);
    color: var(--text);

    text-decoration: none;

    transition:
        background-color .15s ease,
        border-color .15s ease;
}

.btn:hover {
    background: var(--btn-hover);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-danger {
    color: #dc2626;
}

.btn-danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

input,
select,
textarea {
    width: 100%;

    padding: 10px 12px;

    border-radius: 8px;
    border: 1px solid var(--border);

    font-size: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

/*.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;

    max-height: 0;
    opacity: 0;

    transition:
        max-height .4s ease,
        opacity .4s ease;
}

.flash.show {
    max-height: 200px;
    opacity: 1;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
}*/

#flash-container {
    position: fixed;
    top: 20px;
    /* right: 220px; */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash {
    min-width: 300px;
    max-width: 1000px;

    padding: 14px 18px;
    border-radius: 10px;

    opacity: 0;
    transform: translateY(-10px);

    transition:
        opacity .25s ease,
        transform .25s ease;

    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.flash.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.flash.error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

.flash.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.flash.show {
    opacity: 1;
    transform: translateY(0);
}

.share-link {
    display: flex;
    gap: 10px;

    padding: 12px;

    background: #f8fafc;

    border-radius: 8px;

    border: 1px solid var(--border);
}

a, a:link, a:visited, a:active {
    color: var(--link);
}

.upload-frm {
    width: 50%;
    margin: 2rem auto 0;
}

.upload-frm .frm-lbl {
    display: inline-block;
}

.upload-frm .frm-lbl:first-child {
    margin-right: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;

    padding: 3px 8px;

    font-size: 12px;
    font-weight: 500;

    border-radius: 999px;

    background: #f1f5f9;
    color: #475569;

    margin-right: 6px;
}

.icon {
    font-size: 120%;
    margin-right: 1rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --card: #1e293b;
        --text: #f8fafc;
        --muted: #94a3b8;
        --border: #334155;
        --link: #ffffff;
        --btn-hover: #334155;
    }

    .flash {
        background: #14532d;
        color: #dcfce7;
        border-color: #166534;
    }

    .flash.success {
        background: #14532d;
        color: #dcfce7;
        border-color: #166534;
    }

    .flash.error {
        background: #7f1d1d;
        color: #fee2e2;
        border-color: #991b1b;
    }

    .flash.warning {
        background: #78350f;
        color: #fde68a;
        border-color: #92400e;
    }

    .file:hover {
        background: rgba(255,255,255,.03);
    }
    
    .btn-danger:hover {
        background: rgba(220,38,38,.15);
        border-color: rgba(220,38,38,.35);
    }
    
    .badge {
        background: #334155;
        color: #cbd5e1;
    }
}

@media (max-width: 700px) {
    .file-top,
    .share-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-actions {
        flex-wrap: wrap;
    }
}
