/* ============================================================
   SENDIT
   Global Styles
   File Sharing / Network Transfer Theme
   ============================================================ */


/* ============================================================
   COLOR SYSTEM
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-soft: #dbeafe;

    --accent: #7c3aed;
    --accent-light: #f5f3ff;

    --success: #16a34a;
    --success-dark: #166534;
    --success-light: #f0fdf4;

    --danger: #dc2626;
    --danger-light: #fef2f2;

    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-light: #9ca3af;

    --border: #e5e7eb;
    --border-light: #eeeeee;

    --surface: #ffffff;
    --surface-soft: #f9fafb;
    --surface-blue: #f8fbff;

    --shadow:
        0 20px 50px rgba(37, 99, 235, 0.08);
}


/* ============================================================
   RESET
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    background: #ffffff;
    color: var(--text-primary);
    line-height: 1.5;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}


/* ============================================================
   UTILITY
   ============================================================ */

.hidden {
    display: none !important;
}

[hidden] {
    display: none !important;
}


/* ============================================================
   APP SHELL
   ============================================================ */

.app-shell {
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}


/* ============================================================
   HEADER
   ============================================================ */

.site-header {
    width: 100%;
    max-width: 1180px;

    margin: 0 auto;
    padding: 24px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;

    gap: 12px;

    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;

    letter-spacing: -0.04em;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.20);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: var(--text-primary);

    font-size: 18px;
    font-weight: 800;

    line-height: 1.1;
    letter-spacing: -0.03em;
}

.brand-tagline {
    margin-top: 3px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 500;

    line-height: 1.2;
}

.network-status {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 8px 12px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #ffffff;
    color: var(--text-muted);

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}

.network-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 0 3px rgba(22, 163, 74, 0.12);
}


/* ============================================================
   MAIN
   ============================================================ */

.main-content {
    width: 100%;
    max-width: 920px;

    margin: 0 auto;
    padding: 50px 28px 80px;

    flex: 1;
}


/* ============================================================
   HERO
   ============================================================ */

.hero-section {
    text-align: center;
    margin-bottom: 42px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 18px;
    padding: 7px 12px;

    border: 1px solid var(--primary-soft);
    border-radius: 999px;

    color: var(--primary);
    background: var(--primary-light);

    font-size: 12px;
    font-weight: 700;
}

.hero-eyebrow-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}

.hero-section h1 {
    color: var(--text-primary);

    font-size: clamp(42px, 7vw, 72px);
    font-weight: 800;

    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-section h1 span {
    color: var(--primary);
}

.hero-description {
    max-width: 600px;

    margin: 22px auto 0;

    color: var(--text-muted);

    font-size: 16px;
    line-height: 1.7;
}


/* ============================================================
   SECTION LABEL
   ============================================================ */

.section-label {
    display: block;

    margin-bottom: 7px;

    color: var(--primary);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}


/* ============================================================
   TRANSFER CARD
   ============================================================ */

.transfer-card {
    width: 100%;

    border: 1px solid var(--border);
    border-radius: 24px;

    background: var(--surface);

    box-shadow: var(--shadow);

    overflow: hidden;
}

.card-header {
    padding: 30px 30px 24px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}

.card-header h2 {
    color: var(--text-primary);

    font-size: 22px;
    font-weight: 750;

    line-height: 1.25;
    letter-spacing: -0.025em;
}

.card-header p {
    margin-top: 6px;

    color: var(--text-muted);

    font-size: 13px;
}


/* ============================================================
   DROP ZONE
   ============================================================ */

.drop-zone {
    margin: 0 24px 24px;
    padding: 58px 28px;

    border: 1.5px dashed #bfdbfe;
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            #f8fbff 0%,
            #ffffff 100%
        );

    text-align: center;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);

    background: var(--primary-light);

    box-shadow:
        0 8px 25px rgba(37, 99, 235, 0.07);
}

.drop-zone.drag-over {
    transform: scale(1.005);
}

.drop-icon {
    width: 54px;
    height: 54px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );

    color: #ffffff;

    font-size: 25px;
    font-weight: 500;

    box-shadow:
        0 10px 25px rgba(37, 99, 235, 0.20);
}

.drop-zone h3 {
    color: var(--text-primary);

    font-size: 17px;
    font-weight: 700;
}

.drop-zone p {
    margin-top: 7px;

    color: var(--text-muted);

    font-size: 13px;
}

.browse-button {
    border: 0;
    padding: 0;

    background: transparent;

    color: var(--primary);

    font-weight: 700;

    text-decoration: underline;
    text-underline-offset: 3px;
}

.browse-button:hover {
    color: var(--primary-dark);
}

.drop-hint {
    display: block;

    margin-top: 18px;

    color: var(--text-light);

    font-size: 11px;
}


/* ============================================================
   SELECTED FILES
   ============================================================ */

.selected-files-section {
    padding: 0 24px 24px;
}

.file-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 12px;
}

.file-list-header h3 {
    color: var(--text-primary);

    font-size: 14px;
    font-weight: 750;
}

.file-list-header p {
    margin-top: 3px;

    color: var(--text-light);

    font-size: 11px;
}

.text-button {
    border: 0;
    padding: 0;

    background: transparent;

    color: var(--text-muted);

    font-size: 12px;
    font-weight: 650;

    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-button:hover {
    color: var(--primary);
}


/* ============================================================
   FILE LIST
   ============================================================ */

.file-list {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.file-item {
    min-height: 62px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 11px 13px;

    border: 1px solid #dbeafe;
    border-radius: 13px;

    background: var(--surface-blue);

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.file-item:hover {
    border-color: #bfdbfe;
    background: #f0f7ff;
}

.file-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--primary-light);
    border: 1px solid var(--primary-soft);

    color: var(--primary);

    font-size: 15px;
}

.file-info {
    min-width: 0;
    flex: 1;
}

.file-name {
    overflow: hidden;

    color: var(--text-primary);

    font-size: 13px;
    font-weight: 650;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    margin-top: 3px;

    color: var(--text-light);

    font-size: 11px;
}

.remove-file-button {
    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: var(--text-light);

    font-size: 16px;
}

.remove-file-button:hover {
    background: #fee2e2;
    color: var(--danger);
}


/* ============================================================
   FILE SUMMARY
   ============================================================ */

.file-summary {
    padding: 0 24px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    color: var(--text-muted);

    font-size: 12px;
}


/* ============================================================
   ACTION BUTTONS
   ============================================================ */

.transfer-action {
    padding: 0 24px 24px;
}

.create-transfer-button {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 16px;

    padding: 12px 20px;

    border: 1px solid var(--primary-dark);
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    box-shadow:
        0 8px 18px rgba(37, 99, 235, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease,
        box-shadow 0.2s ease;
}

.create-transfer-button:hover:not(:disabled) {
    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #1e40af
        );

    transform: translateY(-1px);

    box-shadow:
        0 12px 25px rgba(37, 99, 235, 0.22);
}

.create-transfer-button:active:not(:disabled) {
    transform: translateY(0);
}

.create-transfer-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.secondary-button {
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 20px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #ffffff;
    color: var(--text-secondary);

    font-size: 13px;
    font-weight: 700;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.secondary-button:hover:not(:disabled) {
    border-color: #bfdbfe;

    background: var(--primary-light);

    color: var(--primary);
}

.secondary-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}


/* ============================================================
   TRANSFER PANEL
   ============================================================ */

.transfer-panel {
    width: 100%;

    margin-top: 24px;
    padding: 30px;

    border: 1px solid var(--primary-soft);
    border-radius: 24px;

    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #f8fbff 100%
        );

    box-shadow:
        0 20px 50px rgba(37, 99, 235, 0.08);
}

.transfer-success {
    display: flex;
    align-items: flex-start;

    gap: 15px;
}

.success-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--accent)
        );

    color: #ffffff;

    font-size: 18px;
    font-weight: 800;

    box-shadow:
        0 8px 18px rgba(37, 99, 235, 0.18);
}

.transfer-success h2 {
    color: var(--text-primary);

    font-size: 21px;
    font-weight: 750;

    letter-spacing: -0.025em;
}

.transfer-success p {
    max-width: 520px;

    margin-top: 6px;

    color: var(--text-muted);

    font-size: 13px;
    line-height: 1.6;
}


/* ============================================================
   QR CODE
   ============================================================ */

.qr-section {
    margin: 30px auto;

    text-align: center;
}

.qr-container {
    width: 280px;
    min-height: 280px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 10px;

    border: 1px solid #bfdbfe;
    border-radius: 18px;

    background: #ffffff;

    box-sizing: border-box;

    box-shadow:
        0 10px 30px rgba(37, 99, 235, 0.07);
}

.qr-container img,
.qr-container canvas {
    display: block;

    max-width: 100%;
    height: auto;
}

.qr-hint {
    margin-top: 12px;

    color: var(--text-light);

    font-size: 11px;
}


/* ============================================================
   TRANSFER LINK
   ============================================================ */

.transfer-link-section {
    margin-top: 24px;
}

.field-label {
    display: block;

    margin-bottom: 8px;

    color: var(--text-muted);

    font-size: 11px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.transfer-link-box {
    min-height: 48px;

    display: flex;
    align-items: center;

    border: 1px solid #bfdbfe;
    border-radius: 12px;

    overflow: hidden;

    background: #ffffff;
}

.transfer-link-box:focus-within {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10);
}

.transfer-link-box input {
    min-width: 0;
    flex: 1;

    height: 46px;

    padding: 0 14px;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--text-secondary);

    font-size: 12px;
}

.copy-button {
    height: 46px;

    padding: 0 16px;

    border: 0;
    border-left: 1px solid #dbeafe;

    background: var(--primary-light);

    color: var(--primary);

    font-size: 12px;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.copy-button:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}


/* ============================================================
   TRANSFER ID
   ============================================================ */

.transfer-id-box {
    margin-top: 12px;
    padding: 12px 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    border: 1px solid var(--border-light);
    border-radius: 11px;

    background: var(--surface-soft);
}

.transfer-id-box span {
    color: var(--text-light);

    font-size: 11px;
}

.transfer-id-box strong {
    color: var(--text-secondary);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 11px;
    letter-spacing: 0.08em;
}


/* ============================================================
   STATUS
   ============================================================ */

.receiver-status {
    margin-top: 16px;
    padding: 11px 13px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: var(--surface-soft);

    color: var(--text-muted);

    font-size: 12px;
    text-align: center;
}

.receiver-status.success {
    border-color: #bbf7d0;

    background: var(--success-light);

    color: var(--success-dark);
}

.receiver-status.error {
    border-color: #fecaca;

    background: var(--danger-light);

    color: #991b1b;
}


/* ============================================================
   TRANSFER PANEL ACTIONS
   ============================================================ */

.transfer-panel-actions {
    margin-top: 16px;

    display: flex;
    justify-content: center;
}


/* ============================================================
   INCOMING TRANSFER
   ============================================================ */

.incoming-section {
    margin-bottom: 24px;
}

.incoming-card {
    padding: 24px;

    border: 1px solid var(--primary-soft);
    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #f8fbff
        );

    box-shadow:
        0 15px 40px rgba(37, 99, 235, 0.06);
}

.incoming-header {
    display: flex;
    align-items: flex-start;

    gap: 14px;
}

.incoming-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: var(--primary-light);
    border: 1px solid var(--primary-soft);

    color: var(--primary);

    font-size: 21px;
    font-weight: 700;
}

.incoming-header h2 {
    color: var(--text-primary);

    font-size: 18px;
    font-weight: 750;

    letter-spacing: -0.02em;
}

.incoming-header p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 12px;
}

.incoming-files {
    margin-top: 20px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 10px;
}

.incoming-file-count,
.incoming-total-size {
    padding: 14px;

    border: 1px solid #dbeafe;
    border-radius: 12px;

    background: var(--primary-light);

    text-align: center;
}

.incoming-file-count strong,
.incoming-total-size strong {
    display: block;

    color: var(--primary-dark);

    font-size: 18px;
    font-weight: 750;
}

.incoming-file-count span,
.incoming-total-size span {
    display: block;

    margin-top: 2px;

    color: var(--text-muted);

    font-size: 10px;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.incoming-actions {
    margin-top: 18px;

    display: flex;
    justify-content: flex-end;

    gap: 10px;
}


/* ============================================================
   RECEIVE SECTION
   ============================================================ */

.receive-section {
    margin-bottom: 24px;
    padding: 24px;

    border: 1px solid var(--border);
    border-radius: 20px;

    background: #ffffff;

    box-shadow:
        0 15px 40px rgba(37, 99, 235, 0.05);
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2 {
    color: var(--text-primary);

    font-size: 20px;
    font-weight: 750;

    letter-spacing: -0.025em;
}

.received-files {
    margin-top: 15px;

    display: flex;
    flex-direction: column;

    gap: 8px;
}


/* ============================================================
   RECEIVER ACTION AREA
   ============================================================ */

.receiver-action-section {
    margin-top: 22px;
}

.receiver-notice {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 14px;

    border: 1px solid #dbeafe;
    border-radius: 12px;

    background: var(--primary-light);
}

.receiver-notice-icon {
    flex: 0 0 auto;

    color: var(--primary);

    font-size: 18px;
    line-height: 1;
}

.receiver-notice strong {
    display: block;

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 700;
}

.receiver-notice span {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.5;
}

.receiver-actions {
    margin-top: 12px;

    display: flex;
    justify-content: flex-end;

    gap: 10px;
}

.receiver-actions .create-transfer-button {
    flex: 1;
}

.receiver-actions .secondary-button {
    min-width: 110px;
}


/* ============================================================
   RECEIVER SUCCESS
   ============================================================ */

.receiver-success {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 14px;

    border: 1px solid #bbf7d0;
    border-radius: 12px;

    background: var(--success-light);
}

.receiver-success .success-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    border-radius: 10px;

    background: var(--success);

    font-size: 14px;
}

.receiver-success strong {
    display: block;

    color: var(--success-dark);

    font-size: 12px;
}

.receiver-success span {
    display: block;

    margin-top: 2px;

    color: #4d7c5a;

    font-size: 11px;
}


/* ============================================================
   RECEIVER TRANSFER ID
   ============================================================ */

.receiver-transfer-id {
    display: inline-flex;
    align-items: center;

    padding: 7px 10px;

    border: 1px solid var(--border-light);
    border-radius: 8px;

    background: var(--surface-soft);

    color: var(--text-light);

    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;

    font-size: 9px;
    letter-spacing: 0.05em;
}


/* ============================================================
   TRANSFER SUMMARY
   ============================================================ */

.transfer-summary {
    margin-top: 18px;
    padding-top: 18px;

    display: grid;
    grid-template-columns: repeat(2, 1fr);

    border-top: 1px solid var(--border-light);
}

.transfer-summary > div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.transfer-summary > div + div {
    padding-left: 20px;

    border-left: 1px solid var(--border-light);
}

.transfer-summary span {
    color: var(--text-light);

    font-size: 10px;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.transfer-summary strong {
    color: var(--text-primary);

    font-size: 15px;
    font-weight: 750;
}


/* ============================================================
   RECEIVER FOOTER ACTION
   ============================================================ */

.receiver-footer-action {
    margin-top: 18px;

    text-align: center;
}


/* ============================================================
   STATE CARD
   ============================================================ */

.state-card {
    padding: 60px 30px;

    text-align: center;
}

.state-icon {
    width: 54px;
    height: 54px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    font-size: 23px;
    font-weight: 700;
}

.loading-state-icon {
    background: var(--primary-light);

    color: var(--primary);

    animation: loadingRotate 1.2s linear infinite;
}

.error-state-icon {
    background: var(--danger-light);

    color: #b91c1c;
}

.state-card h2 {
    color: var(--text-primary);

    font-size: 18px;
    font-weight: 750;

    letter-spacing: -0.02em;
}

.state-card p {
    max-width: 430px;

    margin: 7px auto 0;

    color: var(--text-muted);

    font-size: 13px;
}

.state-actions {
    max-width: 320px;

    margin: 22px auto 0;

    display: flex;
    flex-direction: column;

    gap: 8px;
}

.state-actions .secondary-button,
.state-actions .create-transfer-button {
    width: 100%;
}

@keyframes loadingRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   INFO SECTION
   ============================================================ */

.info-section {
    margin-top: 42px;
}

.info-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}

.info-card {
    padding: 18px;

    display: flex;
    align-items: flex-start;

    gap: 12px;

    border: 1px solid #dbeafe;
    border-radius: 15px;

    background: var(--surface-blue);
}

.info-card-icon {
    width: 32px;
    height: 32px;

    flex: 0 0 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: var(--primary-light);
    border: 1px solid var(--primary-soft);

    color: var(--primary);

    font-size: 14px;
}

.info-card h3 {
    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 750;
}

.info-card p {
    margin-top: 4px;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.5;
}


/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    width: 100%;
    max-width: 920px;

    margin: 0 auto;

    padding: 0 28px 32px;

    text-align: center;

    color: var(--text-muted);

    /*
       Increased from 10px to 14px
       for better readability.
    */
    font-size: 14px;

    line-height: 1.6;
}

.site-footer p + p {
    margin-top: 7px;
}

.site-footer span {
    padding: 0 5px;

    color: var(--text-light);
}

.site-footer a {
    color: var(--text-secondary);

    font-weight: 600;

    text-decoration: none;

    transition:
        color 0.2s ease;
}

.site-footer a:hover {
    color: var(--primary);
}


/* ============================================================
   FOCUS STATES
   ============================================================ */

button:focus-visible,
a:focus-visible,
input:focus-visible,
.drop-zone:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.20);

    outline-offset: 3px;
}


/* ============================================================
   DISABLED / BUSY STATES
   ============================================================ */

button:disabled {
    cursor: not-allowed;
}


/* ============================================================
   DOWNLOAD COMPLETED MESSAGE
   ============================================================ */

.download-completed-message {
    margin-top: 12px;
    padding: 14px;

    display: flex;
    align-items: center;

    gap: 12px;

    border: 1px solid #bbf7d0;
    border-radius: 12px;

    background: var(--success-light);

    box-sizing: border-box;
}

.download-completed-icon {
    width: 34px;
    height: 34px;

    flex: 0 0 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: var(--success);

    color: #ffffff;

    font-size: 16px;
    font-weight: 800;
}

.download-completed-content {
    min-width: 0;
    flex: 1;
}

.download-completed-message strong {
    display: block;

    color: var(--success-dark);

    font-size: 12px;
    font-weight: 750;

    line-height: 1.4;
}

.download-completed-message span {
    display: block;

    margin-top: 2px;

    color: #4d7c5a;

    font-size: 11px;
    line-height: 1.4;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================================
   RECEIVE FILES / QR SCANNER
   ============================================================ */

.receive-files-section {
    width: 100%;

    margin-bottom: 24px;
}

.receive-files-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    padding: 24px;

    border: 1px solid #dbeafe;
    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f8fbff
        );

    box-sizing: border-box;
}

.receive-files-content {
    display: flex;
    align-items: flex-start;

    gap: 16px;

    min-width: 0;
}

.receive-files-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            var(--primary-light),
            var(--accent-light)
        );

    color: var(--primary);

    font-size: 24px;
    font-weight: 700;

    border: 1px solid var(--primary-soft);
}

.receive-files-content h2 {
    margin: 4px 0 6px;

    color: var(--text-primary);

    font-size: 20px;
    font-weight: 750;

    line-height: 1.3;
}

.receive-files-content p {
    margin: 0;

    color: var(--text-muted);

    font-size: 14px;
    line-height: 1.6;
}

.scan-qr-button {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    min-height: 46px;

    padding: 0 18px;

    border: 0;
    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-dark)
        );

    color: #ffffff;

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(37, 99, 235, 0.18);

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}

.scan-qr-button:hover {
    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #1e40af
        );

    transform: translateY(-1px);

    box-shadow:
        0 10px 22px rgba(37, 99, 235, 0.22);
}

.scan-qr-button:active {
    transform: translateY(0);
}

.scan-qr-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.20);

    outline-offset: 3px;
}


/* ============================================================
   QR SCANNER PANEL
   ============================================================ */

.qr-scanner-panel {
    width: 100%;

    margin-bottom: 24px;
}

.qr-scanner-card {
    width: 100%;

    padding: 24px;

    border: 1px solid #dbeafe;
    border-radius: 18px;

    background: #ffffff;

    box-sizing: border-box;

    box-shadow:
        0 15px 40px rgba(37, 99, 235, 0.06);
}

.qr-scanner-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}

.qr-scanner-header h2 {
    margin: 4px 0 0;

    color: var(--text-primary);

    font-size: 22px;
    font-weight: 750;

    line-height: 1.3;
}

.close-scanner-button {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #ffffff;

    color: var(--text-muted);

    font-family: inherit;

    font-size: 24px;
    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease;
}

.close-scanner-button:hover {
    background: var(--primary-light);

    border-color: var(--primary-soft);

    color: var(--primary);
}

.close-scanner-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.15);

    outline-offset: 2px;
}

.qr-scanner-description {
    margin: 10px 0 20px;

    color: var(--text-muted);

    font-size: 14px;
    line-height: 1.6;
}


/* ============================================================
   WEBCAM QR READER
   ============================================================ */

.qr-reader {
    width: 100%;
    max-width: 520px;

    margin: 0 auto;

    overflow: hidden;

    border: 1px solid #bfdbfe;
    border-radius: 16px;

    background: #111827;

    box-sizing: border-box;

    box-shadow:
        0 12px 30px rgba(17, 24, 39, 0.12);
}

.qr-reader video {
    display: block;

    width: 100% !important;
    height: auto !important;

    border-radius: 14px;
}

.qr-reader img {
    max-width: 100%;
}

.qr-reader__scan_region {
    min-height: 280px;
}

.qr-reader__dashboard {
    padding: 12px !important;

    background: #ffffff;
}

.qr-reader__dashboard_section {
    margin: 0 !important;
}

.qr-reader button {
    min-height: 40px;

    padding: 8px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #ffffff;

    color: var(--primary);

    font-family: inherit;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.qr-reader button:hover {
    background: var(--primary-light);

    border-color: var(--primary-soft);
}

.qr-reader select {
    min-height: 40px;

    padding: 8px 10px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #ffffff;

    color: var(--text-primary);

    font-family: inherit;
}


/* ============================================================
   QR SCANNER STATUS
   ============================================================ */

.qr-scanner-status {
    max-width: 520px;

    margin: 14px auto 0;

    padding: 12px 14px;

    border: 1px solid #dbeafe;
    border-radius: 12px;

    background: var(--primary-light);

    color: var(--primary-dark);

    font-size: 13px;
    line-height: 1.5;

    text-align: center;

    box-sizing: border-box;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {

    .site-header {
        padding: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;

        border-radius: 10px;

        font-size: 18px;
    }

    .brand-name {
        font-size: 16px;
    }

    .brand-tagline {
        font-size: 9px;
    }

    .network-status {
        padding: 7px 10px;

        font-size: 10px;
    }

    .main-content {
        padding: 34px 16px 60px;
    }

    .hero-section {
        margin-bottom: 30px;
    }

    .hero-section h1 {
        font-size: clamp(40px, 13vw, 58px);
    }

    .hero-description {
        margin-top: 17px;

        font-size: 13px;
        line-height: 1.6;
    }

    .transfer-card {
        border-radius: 18px;
    }

    .card-header {
        padding: 22px 18px 18px;
    }

    .card-header h2 {
        font-size: 19px;
    }

    .drop-zone {
        margin: 0 14px 18px;

        padding: 42px 18px;

        border-radius: 15px;
    }

    .selected-files-section {
        padding: 0 14px 18px;
    }

    .transfer-action {
        padding: 0 14px 18px;
    }

    .transfer-panel {
        margin-top: 16px;

        padding: 20px;

        border-radius: 18px;
    }

    .qr-container {
        width: 220px;
        min-height: 220px;
    }

    .incoming-card,
    .receive-section {
        padding: 18px;

        border-radius: 17px;
    }

    .incoming-actions,
    .receiver-actions {
        flex-direction: column-reverse;
    }

    .incoming-actions button,
    .receiver-actions button {
        width: 100%;
    }

    .receiver-actions .secondary-button {
        min-width: 0;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-card {
        padding: 15px;
    }

    .site-footer {
        padding: 0 18px 26px;

        font-size: 14px;
    }

    .receive-files-card {
        flex-direction: column;
        align-items: stretch;

        padding: 20px;
    }

    .receive-files-content {
        gap: 12px;
    }

    .receive-files-icon {
        width: 42px;
        height: 42px;

        flex-basis: 42px;

        border-radius: 12px;

        font-size: 22px;
    }

    .receive-files-content h2 {
        font-size: 18px;
    }

    .receive-files-content p {
        font-size: 13px;
    }

    .scan-qr-button {
        width: 100%;
    }

    .qr-scanner-card {
        padding: 20px;
    }

    .qr-scanner-header h2 {
        font-size: 20px;
    }

    .qr-reader {
        max-width: 100%;
    }

    .qr-reader__scan_region {
        min-height: 220px;
    }
}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 430px) {

    .site-header {
        align-items: flex-start;
    }

    .brand-tagline {
        display: none;
    }

    .network-status span:last-child {
        display: none;
    }

    .network-status {
        width: 28px;
        height: 28px;

        justify-content: center;

        padding: 0;
    }

    .hero-section h1 {
        font-size: 42px;
    }

    .hero-description {
        font-size: 12px;
    }

    .incoming-files {
        grid-template-columns: 1fr;
    }

    .transfer-link-box {
        flex-direction: column;
        align-items: stretch;
    }

    .transfer-link-box input {
        width: 100%;
    }

    .copy-button {
        width: 100%;

        border-top: 1px solid #dbeafe;
        border-left: 0;
    }

    .transfer-id-box {
        flex-direction: column;
        align-items: flex-start;

        gap: 5px;
    }

    .receiver-transfer-id {
        max-width: 140px;

        overflow: hidden;

        text-overflow: ellipsis;
    }

    .transfer-summary {
        gap: 12px;
    }

    .transfer-summary > div + div {
        padding-left: 12px;
    }

    .download-completed-message {
        padding: 12px;

        gap: 10px;
    }

    .download-completed-icon {
        width: 32px;
        height: 32px;

        flex-basis: 32px;
    }

    .site-footer {
        padding: 0 16px 24px;

        font-size: 14px;
    }
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
/* =========================================
   PREREQUISITES DIALOG
========================================= */

.prerequisite-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(15, 23, 42, 0.45);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    animation: prerequisiteFadeIn 0.2s ease;
}

.prerequisite-overlay[hidden] {
    display: none;
}


/* =========================================
   DIALOG
========================================= */

.prerequisite-dialog {
    width: min(100%, 500px);
    max-height: 90vh;

    overflow-y: auto;

    background: #ffffff;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.18),
        0 8px 20px rgba(15, 23, 42, 0.08);

    animation: prerequisiteSlideUp 0.25s ease;
}

.prerequisite-content {
    padding: 28px;
}


/* =========================================
   ICON
========================================= */

.prerequisite-icon {
    width: 46px;
    height: 46px;

    margin-bottom: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eff6ff;
    color: #2563eb;

    border-radius: 12px;
}

.prerequisite-icon svg {
    width: 23px;
    height: 23px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;

    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================
   HEADER
========================================= */

.prerequisite-eyebrow {
    display: block;

    margin-bottom: 7px;

    font-size: 12px;
    font-weight: 700;

    color: #2563eb;

    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.prerequisite-dialog h2 {
    margin: 0 0 8px;

    font-size: 24px;
    line-height: 1.25;

    font-weight: 700;

    color: #0f172a;
}

.prerequisite-description {
    margin: 0 0 22px;

    font-size: 14px;
    line-height: 1.6;

    color: #64748b;
}


/* =========================================
   REQUIREMENT LIST
========================================= */

.prerequisite-list {
    display: flex;
    flex-direction: column;

    gap: 16px;

    margin-bottom: 24px;
}

.prerequisite-item {
    display: flex;
    align-items: flex-start;

    gap: 12px;
}


/* Number */

.prerequisite-number {
    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 1px;

    background: #eff6ff;
    color: #2563eb;

    border-radius: 50%;

    font-size: 12px;
    font-weight: 700;

    line-height: 1;
}


/* Text */

.prerequisite-item strong {
    display: block;

    margin-bottom: 2px;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.4;

    color: #0f172a;
}

.prerequisite-item span {
    display: block;

    font-size: 13px;
    line-height: 1.55;

    color: #64748b;
}


/* =========================================
   CONTINUE BUTTON
========================================= */

.prerequisite-button {
    width: 100%;
    min-height: 46px;

    border: 0;
    border-radius: 9px;

    background: #2563eb;
    color: #ffffff;

    font-family: inherit;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}

.prerequisite-button:hover {
    background: #1d4ed8;
}

.prerequisite-button:active {
    transform: translateY(1px);
}

.prerequisite-button:focus-visible {
    outline: 3px solid #bfdbfe;
    outline-offset: 2px;
}


/* =========================================
   GUIDE LINK
========================================= */

.prerequisite-guide {
    display: block;

    margin-top: 13px;

    text-align: center;

    font-size: 13px;
    font-weight: 500;

    color: #64748b;

    text-decoration: none;

    transition: color 0.15s ease;
}

.prerequisite-guide:hover {
    color: #2563eb;
}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes prerequisiteFadeIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}

@keyframes prerequisiteSlideUp {

    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .prerequisite-overlay {
        padding: 14px;
    }

    .prerequisite-dialog {
        width: 100%;
        max-height: 92vh;

        border-radius: 16px;
    }

    .prerequisite-content {
        padding: 23px;
    }

    .prerequisite-dialog h2 {
        font-size: 22px;
    }

    .prerequisite-description {
        font-size: 13.5px;
    }

    .prerequisite-list {
        gap: 14px;
    }

    .prerequisite-item {
        gap: 10px;
    }

    .prerequisite-item strong {
        font-size: 13.5px;
    }

    .prerequisite-item span {
        font-size: 12.5px;
    }

}
/* =========================================
   DEVELOPER CREDIT
========================================= */

.developer-credit {
    margin-top: 8px;
}

.developer-credit a {
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.developer-credit a:hover {
    color: var(--primary);
}