@import url('https://fonts.googleapis.com/css2?family=Chiron+GoRound+TC:wght@200..900&display=swap');

:root {
    --primary-100: #2E8B57;
    --primary-200: #61bc84;
    --primary-300: #c6ffe6;
    --accent-100: #8FBC8F;
    --accent-200: #345e37;
    --text-100: #FFFFFF;
    --text-200: #e0e0e0;
    --bg-100: #1E1E1E;
    --bg-200: #2d2d2d;
    --bg-300: #454545;
}

* {
    font-family: "Chiron GoRound TC", sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-weight: 400;
    color: var(--text-100);
    background-color: var(--bg-100);
}

a {
    color: var(--accent-100);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

h1, h2, h3 {
    margin: 2vh 0;
    padding: 0;
}

h4, h5, h6, p {
    margin: 1vh 0;
    padding: 0;
}

h1, .h1 {
    font-size: 48px;
}

h2, .h2 {
    font-size: 40px;
}

h3, .h3 {
    font-size: 32px;
}

h4, .h4 {
    font-size: 28px;
}

h5, .h5 {
    font-size: 24px;
}

h6, .h6 {
    font-size: 20px;
}

p, .p {
    font-size: 16px;
}

.t-left {
    text-align: left;
}

.t-center {
    text-align: center;
}

.t-right {
    text-align: right;
}

.w-100 {
    width: 100%;
}

.form-600 {
    margin: 0 auto;
    padding: 2vh;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 3vh;
}

input {
    padding: 8px 16px;
    border-radius: 10px;
    border: 2px solid var(--accent-100);
    background: none;
    color: var(--text-100);
    font-size: 24px;
}

input:focus {
    outline: none;
    background-color: var(--bg-200);
}

button, select {
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    background: var(--accent-100);
    color: var(--text-100);
    font-size: 24px;
}

button:hover {
    opacity: 0.8;
}

.menu {
    display: flex;
    justify-content: flex-start;
    gap: 3vh;
}

#operation {
    font-size: 24px;
}

@media screen and (max-width: 600px) {
    .menu {
        flex-wrap: wrap;
    }

    #operation {
        font-size: 20px;
    }
}

/* List */

.list {
    margin: 3vh 0;
    display: flex;
    flex-direction: column;
    gap: 1vh;
}

.list > div {
    user-select: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-100);
    font-size: 24px;
    transition: all 0.3s ease-in-out;
}

.list .info {
    flex-grow: 1;
    min-width: 0;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
}

.list a {
    padding: 8px 16px;
}

.list .name {
    flex-grow: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: max(50vw, 400px);
}

.list .size {
    padding: 0 3vw;
    font-size: 18px;
}

.list .modify {
    font-size: 18px;
}

.directory .info {
    background: var(--accent-200);
}

.directory .info.choose {
    color: var(--accent-200);
    background: var(--primary-300);
}

.file .info {
    border: 2px solid var(--accent-200);
}

.file .info.choose {
    color: var(--accent-200);
    background: var(--primary-300);
    border: none;
}

@media screen and (max-width: 600px) {
    .list {
        gap: 2vh;
    }

    .list .info {
        gap: 1vh;
    }

    .list .name {
        max-width: inherit;
    }

    .list .size {
        padding: 0;
    }
}

.share_link {
    cursor: pointer;
    width: 100%;
    margin: 1vh 0;
    padding: 4px 8px;
    color: var(--accent-100);
    font-size: 20px;
    word-break: break-all;
    transition: all 0.3s ease-in-out;
}

.share_link:hover {
    opacity: 0.8;
}

/* Move */

.directory_move {
    display: flex;
    flex-direction: column;
    gap: 1vh;
}

.directory_move .parent, .directory_move .directory {
    cursor: pointer;
    padding: 8px 16px;
    display: flex;
    border-radius: 10px;
    font-size: 20px;
    transition: all 0.3s ease-in-out;
}

.directory_move .parent:hover, .directory_move .directory:hover {
    opacity: 0.8;
}

.directory_move .parent {
    background: var(--accent-100);
}

.directory_move .directory {
    background: var(--accent-200);
}

.upload {
    cursor: pointer;
    padding: 8px 16px;
    border: 2px solid var(--accent-200);
    border-radius: 10px;
    color: var(--text-100);
    font-size: 20px;
    transition: all 0.3s ease-in-out;
}

.upload:hover {
    opacity: 0.8;
}

/* Progress */

#open_progress {
    cursor: pointer;
    position: fixed;
    right: 5vmin;
    bottom: 5vmin;
    z-index: 10;
    font-size: 32px;
    background: var(--bg-200);
    padding: 16px;
    border-radius: 10px;
}

#open_progress:hover {
    opacity: 0.8;
}

#progress {
    position: fixed;
    right: 5vmin;
    bottom: 5vmin;
    width: 90vw;
    max-width: 400px;
    height: 90vh;
    max-height: 400px;
    overflow: auto;
    color: var(--text-100);
    background: var(--bg-200);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

#progress .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 2px solid var(--bg-100);
}

#progress .header .close {
    cursor: pointer;
    font-size: 24px;
    color: var(--text-100);
    transition: all 0.3s ease-in-out;
}

#progress .header .close:hover {
    opacity: 0.8;
}

#progress .body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 1vh;
    overflow: auto;
}

.progress {
    display: flex;
    flex-direction: column;
    gap: 1vh;
}

.progress .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 20px;
}

.progress .item .percent {
    color: var(--accent-100);
}

.progress .bar {
    width: 100%;
    height: 20px;
    border: 2px solid var(--accent-100);
    border-radius: 10px;    
    background: linear-gradient(90deg, var(--accent-200) 25%, var(--accent-100) 50%, var(--accent-200) 75%);
    background-size: 200% 100%;
    animation: loading-gradient 2s linear infinite;
}

@keyframes loading-gradient {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}