* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #18202f;
    --muted: #7c8495;
    --border: #e7eaf0;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --success: #16a34a;
    --shadow:
        0 10px 30px rgba(20, 30, 55, 0.06);
}

body {
    margin: 0;
    font-family:
        Tahoma,
        Arial,
        sans-serif;

    background: var(--bg);
    color: var(--text);

    min-height: 100vh;
}

button,
input {
    font-family: inherit;
}

button {
    cursor: pointer;
}

.app {
    min-height: 100vh;
}


/* Header */

.topbar {
    height: 82px;
    background: white;
    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        0 5%;

    position: sticky;
    top: 0;
    z-index: 20;
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-icon {
    width: 44px;
    height: 44px;

    border-radius: 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #4f46e5
        );

    color: white;

    font-size: 23px;
}

.brand h1 {
    margin: 0;
    font-size: 18px;
}

.brand span {
    display: block;
    margin-top: 4px;

    color: var(--muted);
    font-size: 12px;
}

.file-count {
    color: var(--muted);
    font-size: 13px;
}

.file-count strong {
    color: var(--primary);
    font-size: 20px;
}


/* Container */

.container {
    width: min(1180px, 92%);
    margin: 35px auto;
}


/* Upload */

.upload-card {
    background: white;

    border-radius: 24px;

    padding: 22px;

    box-shadow: var(--shadow);
}

.drop-zone {
    min-height: 275px;

    border:
        2px dashed #dfe3ec;

    border-radius: 20px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    transition: .2s;

    padding: 30px;
}

.drop-zone.dragging {
    border-color: var(--primary);
    background: #f5f4ff;
}

.upload-icon {
    width: 62px;
    height: 62px;

    border-radius: 20px;

    background: #eeedff;

    color: var(--primary);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;

    margin-bottom: 16px;
}

.drop-zone h2 {
    margin: 0;

    font-size: 20px;
}

.drop-zone p {
    color: var(--muted);

    margin: 10px 0 8px;

    font-size: 14px;
}

.limit {
    color: #a0a6b2;
    font-size: 11px;
}

.choose-btn {
    margin-top: 20px;

    border: none;

    padding:
        12px 28px;

    border-radius: 11px;

    background: var(--primary);

    color: white;

    font-size: 13px;

    transition: .2s;
}

.choose-btn:hover {
    background: var(--primary-dark);

    transform: translateY(-1px);
}


/* Progress */

.progress-area {
    padding:
        18px 8px 3px;
}

.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;

    font-size: 12px;

    margin-bottom: 8px;
}

.progress-info span {
    max-width: 80%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.progress-info strong {
    color: var(--primary);
}

.progress {
    height: 7px;

    background: #edf0f5;

    border-radius: 10px;

    overflow: hidden;
}

.progress-bar {
    height: 100%;

    width: 0;

    background:
        linear-gradient(
            90deg,
            #6366f1,
            #4f46e5
        );

    transition: width .15s;
}


/* Files header */

.files-header {
    margin:
        38px 0 20px;

    display: flex;

    justify-content: space-between;

    align-items: end;

    gap: 20px;
}

.files-header h2 {
    margin: 0 0 7px;

    font-size: 21px;
}

.files-header span {
    color: var(--muted);

    font-size: 12px;
}

.search-box {
    width: 270px;

    background: white;

    border: 1px solid var(--border);

    border-radius: 12px;

    display: flex;

    align-items: center;

    padding: 0 12px;

    color: #a3a8b2;
}

.search-box input {
    width: 100%;

    height: 42px;

    border: none;

    outline: none;

    background: transparent;

    font-size: 12px;
}


/* Grid */

.files-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(270px, 1fr)
        );

    gap: 18px;
}


/* File card */

.file-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 18px;

    overflow: hidden;

    transition: .2s;

    box-shadow:
        0 5px 20px
        rgba(20, 30, 55, .035);
}

.file-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 15px 35px
        rgba(20, 30, 55, .09);
}

.file-preview {
    height: 170px;

    background:
        linear-gradient(
            135deg,
            #f8f9fc,
            #eef1f7
        );

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.file-preview img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.file-icon {
    font-size: 55px;
}


/* Info */

.file-info {
    padding:
        16px 16px 10px;
}

.file-info h3 {
    margin: 0;

    font-size: 14px;

    font-weight: 600;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.meta {
    display: flex;

    gap: 6px;

    color: var(--muted);

    margin-top: 8px;

    font-size: 10px;
}


/* Actions */

.file-actions {
    padding:
        8px 16px 16px;

    display: flex;

    gap: 8px;
}

.download-btn,
.copy-btn {
    flex: 1;

    height: 38px;

    border-radius: 10px;

    display: flex;

    align-items: center;
    justify-content: center;

    text-decoration: none;

    font-size: 11px;

    border: none;
}

.download-btn {
    background: var(--primary);

    color: white;
}

.copy-btn {
    background: #f1f3f7;

    color: #596173;
}


/* Empty */

.empty {
    grid-column: 1 / -1;

    text-align: center;

    padding: 70px 20px;

    color: var(--muted);
}

.empty > div {
    font-size: 55px;

    margin-bottom: 15px;
}

.empty h3 {
    margin: 0 0 8px;

    color: var(--text);
}

.empty p {
    margin: 0;

    font-size: 13px;
}


/* Footer */

footer {
    text-align: center;

    color: #a2a7b1;

    font-size: 10px;

    padding:
        20px;
}


/* Toast */

.toast {
    position: fixed;

    bottom: 25px;
    right: 25px;

    background: #1d2433;

    color: white;

    padding:
        13px 20px;

    border-radius: 11px;

    font-size: 12px;

    transform:
        translateY(80px);

    opacity: 0;

    transition: .25s;

    z-index: 100;
}

.toast.show {
    transform:
        translateY(0);

    opacity: 1;
}


/* Mobile */

@media (max-width: 650px) {

    .topbar {
        height: 70px;

        padding:
            0 4%;
    }

    .brand h1 {
        font-size: 15px;
    }

    .brand-icon {
        width: 39px;
        height: 39px;
    }

    .file-count {
        font-size: 10px;
    }

    .file-count strong {
        font-size: 16px;
    }

    .container {
        width: 94%;

        margin-top: 20px;
    }

    .upload-card {
        padding: 10px;

        border-radius: 18px;
    }

    .drop-zone {
        min-height: 230px;

        padding: 20px;

        border-radius: 15px;
    }

    .drop-zone h2 {
        font-size: 17px;
    }

    .files-header {
        align-items: stretch;

        flex-direction: column;

        margin-top: 28px;
    }

    .search-box {
        width: 100%;
    }

    .files-grid {
        grid-template-columns:
            1fr;
    }

    .file-preview {
        height: 190px;
    }

    .toast {
        right: 12px;
        left: 12px;

        bottom: 15px;

        text-align: center;
    }
}