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

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    min-height: 100vh;
}

.navbar {
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #007aff;
    text-decoration: none;
}

.upload-container, .download-container {
    max-width: 600px;
    margin: 60px auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.subtitle { color: #666; margin-bottom: 1.5rem; }

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 1rem;
}
.drop-zone.drag-over { border-color: #007aff; background: #f0f7ff; }
.drop-zone p { color: #666; margin-bottom: 0.75rem; }

.btn-browse {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: #007aff;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
}

.file-list {
    list-style: none;
    margin: 1rem 0;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}
.file-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}
.file-list li:last-child { border-bottom: none; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.file-size { color: #888; white-space: nowrap; }

.form-field { margin: 1rem 0; }
.form-field label { display: block; font-weight: 500; margin-bottom: 0.4rem; }
.form-field textarea {
    width: 100%; padding: 0.6rem; border: 1px solid #ddd;
    border-radius: 6px; font-size: 0.95rem; resize: vertical;
}

.expiry-selector {
    display: flex; align-items: center; gap: 1rem;
    margin: 1rem 0; font-size: 0.95rem;
}
.expiry-selector label { cursor: pointer; }

.btn-primary {
    display: inline-block; width: 100%; padding: 0.75rem;
    background: #007aff; color: #fff; border: none;
    border-radius: 8px; font-size: 1rem; font-weight: 600;
    cursor: pointer; text-align: center; text-decoration: none;
    margin-top: 1rem; transition: background 0.2s;
}
.btn-primary:hover:not(:disabled) { background: #005ecb; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    display: inline-block; padding: 0.6rem 1.25rem;
    background: #eee; color: #333; border: none;
    border-radius: 6px; font-size: 0.95rem; cursor: pointer;
    margin-top: 0.75rem; text-decoration: none;
}

.progress-wrap { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; }
.progress-track { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: #007aff; transition: width 0.2s; }
.progress-label { font-size: 0.85rem; color: #555; white-space: nowrap; }

.success-box { text-align: center; }
.copy-row { display: flex; gap: 0.5rem; margin: 1rem 0; }
.link-input {
    flex: 1; padding: 0.6rem; border: 1px solid #ddd;
    border-radius: 6px; font-size: 0.9rem; background: #f9f9f9;
}
.btn-copy {
    padding: 0.6rem 1rem; background: #007aff; color: #fff;
    border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem;
}
.expires-text { color: #888; font-size: 0.9rem; margin: 0.5rem 0; }

.btn-download { display: block; text-decoration: none; }

.error-msg { color: #d32f2f; font-size: 0.9rem; margin: 0.5rem 0; }
.error-box { text-align: center; }
.error-box h2 { color: #d32f2f; margin-bottom: 0.5rem; }
.error-box a { color: #007aff; }

blockquote.sender-message {
    border-left: 3px solid #007aff; padding: 0.75rem 1rem;
    background: #f0f7ff; border-radius: 0 6px 6px 0;
    margin: 1rem 0; font-style: italic; color: #444;
}
.total-size { font-weight: 600; margin: 0.5rem 0; }

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}
.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #007aff;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}
