* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-thumb {
    border-radius: 3.5px;
    background-color: rgba(50, 50, 50, 0.3);
}

::-webkit-scrollbar-track {
    border-radius: 3.5px;
    background-color: rgba(50, 50, 50, 0.1);
}

html {
    height: 100%;
}

@-webkit-keyframes Gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes Gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

body {
    min-height: 100vh; /* Changed from 100% to 100vh */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Changed from center to space-between */
    background: radial-gradient(circle at 60% 40%, rgba(117, 113, 251, 0.7) 0%, rgba(62, 144, 238, 0.7) 40%, rgba(68, 155, 255, 0.7) 70%, rgba(9, 69, 138, 0.2) 100%);
    background-size: 300% 300%;
    background-attachment: fixed;
    -webkit-animation: Gradient 30s ease infinite;
    animation: Gradient 30s ease infinite;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    font-size: 14px;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    display: grid;
    gap: 30px;
    grid-template-columns: 320px 580px;
    grid-template-rows: auto;
    max-width: 90%;
    margin-bottom: 35px; /* Reduced from 60px to 40px */
    position: relative;
}

.upload,
.filelist {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.upload .title,
.filelist .title {
    min-height: 44px; /* 原60px，缩小高度 */
    padding: 0 16px;  /* 原24px，缩小内边距 */
    color: #333;
    font-weight: 600;
    font-size: 15px;  /* 原16px，略缩小字体 */
    display: flex;
    flex-direction: column; /* Changed from row to column */
    gap: 10px; /* Increased gap between title and controls */
    padding-top: 12px; /* Added padding top */
    padding-bottom: 12px; /* Added padding bottom */
}

/* 网关选择器样式 */
.gateway-selector {
    padding: 8px 16px; /* 原14px 24px，缩小内边距 */
    border-bottom: 1px solid #f0f4f9;
    background-color: rgba(249, 250, 252, 0.7);
    text-align: center;
    min-height: 36px;  /* 增加最小高度限制，适当缩小 */
}

.title-text {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%; /* Take full width */
    justify-content: center; /* Center the title */
    padding-bottom: 6px; /* Add some space below the title */
    border-bottom: 1px solid #f0f4f9; /* Add a subtle separator */
}

.upload {
    -webkit-animation: slideRight 1.5s;
    animation: slideRight 1.5s;
    transition: all 0.4s ease;
    height: 520px;
    display: flex;
    flex-direction: column;
}

.upload:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.upload .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.button-group {
    display: none; /* Hide button group since we're removing it */
}

.gateway-button {
    background-color: #e6f0ff !important;
    color: #409eff !important;
}

.upload .title select {
    height: 32px;
    padding: 0 8px;
    border-radius: 16px;
    border: 1px solid #dcdfe6;
    outline: none;
}

#show {
    width: 475px;
    height: 32px;
    outline: none;
    border: 1px solid #dcdfe6;
    padding: 0 15px;
    color: #444;
    border-radius: 16px;
    font-size: 13px;
    transition: all 0.3s ease;
    -webkit-appearance: none;
}

.upload .title input:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.upload .content {
    cursor: pointer;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: all 0.4s ease;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.upload .content:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(64, 158, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
}

.upload .content:hover:before {
    opacity: 1;
}

.upload .content:hover {
    background-color: #f9fafc;
}

.upload .content:active {
    transform: scale(0.98);
}

.upload .content .icon {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    fill: #777;
    z-index: 1;
}

.upload .content:hover .icon {
    transform: translateY(-8px);
    fill: #409eff;
}

.upload .content .desc {
    color: #444;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 1;
}

/* 优化上传描述字体和间距 */
.upload .content .desc {
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.upload .content:hover .desc {
    color: #333;
}

.upload.dragenter {
    box-shadow: 0 15px 50px rgba(64, 158, 255, 0.3);
    background-color: #f0f8ff;
    transform: scale(1.02);
}

.upload.dragenter .content>* {
    pointer-events: none;
}

.filelist {
    -webkit-animation: slideLeft 1.5s;
    animation: slideLeft 1.5s;
    display: flex;
    flex-direction: column;
    height: 520px;
}

.filelist .title {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 16px;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    flex-direction: column; /* Changed from row to column */
    gap: 10px; /* Increased gap between title and controls */
    padding-top: 12px; /* Added padding top */
    padding-bottom: 12px; /* Added padding bottom */
}

.filelist .list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 20px;
    padding-bottom: 30px;
    margin-bottom: 10px;
    scroll-behavior: smooth;
}

.filelist .list .item {
    margin-bottom: 15px; /* Reduced from 20px */
    background-color: #f9fafc;
    border-radius: 12px;
    padding: 14px; /* Reduced from 18px */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* 优化 filelist 列表项在不同屏幕的圆角和阴影 */
.filelist .list .item {
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
    padding: 11px;
}

.filelist .list .item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    background-color: #f5f9ff;
}

.filelist .list .item .file {
    display: flex;
    align-items: center;
    margin-bottom: 8px; /* Reduced from 10px */
}

.filelist .list .item .file .icon {
    width: 42px; /* Reduced from 52px */
    height: 42px; /* Reduced from 52px */
    margin-right: 15px;
    fill: #777;
    background-color: rgba(144, 147, 153, 0.08);
    padding: 10px; /* Reduced from 12px */
    border-radius: 10px; /* Reduced from 12px */
    transition: all 0.3s ease;
}

.filelist .list .item .file .desc {
    flex: 1;
    min-width: 0;
}

.filelist .list .item .file .desc__name {
    font-size: 15px; /* Reduced from 16px */
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px; /* Reduced from 8px */
}

.filelist .list .item .file .desc__size {
    font-size: 12px; /* Reduced from 13px */
    color: #909399;
}

.filelist .list .item .file .link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px; /* Reduced from 10px */
    cursor: pointer;
    margin-left: 10px; /* Reduced from 12px */
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: rgba(240, 240, 240, 0.5);
    width: 34px; /* Reduced from 40px */
    height: 34px; /* Reduced from 40px */
}

.filelist .list .item .file .link svg {
    width: 18px; /* Reduced from 20px */
    height: 18px; /* Reduced from 20px */
    transition: all 0.3s ease;
}

.filelist .list .item .progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px; /* Reduced from 12px */
    margin-bottom: 8px; /* Reduced from 10px */
}

.filelist .list .item .progress .progress-bar {
    flex: 1;
    min-width: 0;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.filelist .list .item .progress .progress-bar .progress-inner {
    width: 0%;
    height: 100%;
    background: #409eff;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.filelist .list .item .progress .progress-bar .progress-inner.success {
    background: #67c23a;
}

.filelist .list .item .progress .progress-bar .progress-inner.error {
    background: #f56c6c;
}

.filelist .list .item .progress .progress-status {
    margin-left: 8px;
}

.filelist .list .item .progress .progress-status .icon {
    display: none;
    width: 14px;
    height: 14px;
}

@-webkit-keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@-webkit-keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 900px) {
    body {
        justify-content: flex-start;
        padding-top: 20px;
        padding-bottom: 60px;
        min-height: 100vh;
    }
    
    .site-header {
        margin-bottom: 8px; /* 原20px，缩小为8px */
    }
    
    .container {
        grid-template-columns: minmax(300px, 90%);
        grid-template-rows: auto auto;
        width: 100%;
        margin-bottom: 20px; /* Reduced from 40px to 30px */
    }
    
    .upload {
        height: auto;
        min-height: 200px;
        transition: all 0.4s ease;
    }
    
    .filelist {
        height: auto;
        min-height: 300px;
        transition: all 0.4s ease;
    }
    
    .upload .content {
        padding: 30px 15px;
    }
    
    .upload .content .icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    #show {
        width: 100%;
        max-width: 350px;
    }
    
    .filelist .title {
        height: auto;
        min-height: 50px;
        padding: 10px 15px;
        gap: 8px;
    }
    
    .filelist .list {
        max-height: 400px;
        padding-bottom: 40px; /* 确保底部内容不被footer遮挡 */
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 10px 50px 10px;
    }
    
    .site-header {
        margin-bottom: 10px;
    }
    
    .site-logo {
        font-size: 18px;
        gap: 8px;
    }
    
    .site-logo img {
        width: 28px;
        height: 28px;
    }
    
    .container {
        gap: 15px;
        max-width: 95%;
    }
    
    .upload .content .icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }
    
    .button-group button {
        width: 60px;
        height: 28px;
        font-size: 12px;
    }
    
    .filelist .list {
        padding: 10px;
    }
    
    .filelist .list .item {
        padding: 10px;
    }
    
    .upload .title,
    .filelist .title {
        font-size: 15px;
        padding: 10px 15px;
        min-height: 50px;
    }
    
    .gateway-selector {
        padding: 8px 15px;
        padding: 10px 15px;
        min-height: 60px;
        text-align: center; /* 确保在移动端也居中 */
    }
    
    .upload .title small {
        display: block;
        margin-top: 2px;
    }
    .filelist .title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 15px;
        flex-wrap: nowrap; /* 防止换行 */
    }
    
    .select-group {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        width: 100%;
        justify-content: center; /* 确保在移动端也居中 */
    }
    
    .select-group label {
        font-size: 13px;
        font-weight: 400;
        white-space: nowrap;
        width: auto;
    }
    
    .select-group select {
        flex: 1;
        min-width: 0;
        max-width: none;
    }
      .copyall {
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 12px;
        font-size: 13px;
        font-weight: 500;
        min-width: 70px;
        margin-left: auto;
        white-space: nowrap;
        flex-shrink: 0; /* 防止按钮缩小 */
    }
    
    .upload .content .desc {
        font-size: 14px;
    }
    
    .filelist .list .item .file {
        flex-wrap: wrap;
    }
    
    .filelist .list .item .file .icon {
        width: 40px;
        height: 40px;
        padding: 8px;
    }
    
    .filelist .list .item .file .link {
        width: 32px;
        height: 32px;
    }
    
    .copy-buttons-group {
        display: none; /* Hide completely */
    }
    
    .copy-btn {
        display: none; /* Hide completely */
    }
}

/* Mobile optimized filelist title layout */
@media (max-width: 480px) {
    .filelist .title {
        padding: 10px 15px;
        min-height: 50px;
        gap: 8px; /* Reduce gap on mobile */
    }
    
    .title-text {
        font-size: 14px; /* Smaller font on mobile */
        padding-bottom: 4px; /* Less padding on mobile */
    }
    
    .batch-actions {
        gap: 6px; /* Smaller gap for tighter layout */
    }
    
    .action-button, .copyall {
        height: 32px; /* Standardize height */
        padding: 0 8px;
        font-size: 12px;
        min-width: 60px; /* Ensure minimum width */
    }
    
    .toggle-all-wrapper, .short-url-wrapper {
        display: flex;
        align-items: center;
        min-width: 50px; /* Ensure minimum width */
    }
    
    /* Ensure label text doesn't overflow */
    .toggle-all-label, .short-url-label {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 50px; /* Prevent labels from taking too much space */
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .filelist .title {
        padding: 8px 10px;
    }
    
    .batch-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .action-button, .copyall {
        padding: 0 6px;
        min-width: 50px;
        font-size: 11px;
    }
    
    .toggle-all-label, .short-url-label {
        max-width: 40px;
    }
}

/* Language selector styling */
/* .lang-selector {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
} */

#langSelect {
    padding: 5px 8px;
    border-radius: 8px;
    border: 1px solid #dcdfe6;
    background-color: #fff;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

#langSelect:focus {
    outline: none;
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64,158,255,0.2);
}

/* Make sure the title has position relative to contain the absolute positioned language selector */
.upload .title {
    position: relative;
    display: flex;
    align-items: center;
}

.action-button,
.copyall {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ecf5ff;
    color: #409eff;
    padding: 6px 15px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(64, 158, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    background-color: #409eff;
    color: white;
    border: none;
}

.action-button:hover,
.copyall:hover {
    background-color: #66b1ff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4);
}

.action-button:active,
.copyall:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(64, 158, 255, 0.2);
}

.copyall i {
    margin-right: 5px;
}

/* Initially hide the copy all button until files are uploaded */
.copyall {
    display: none;
}

/* 为设置口令栏添加样式，包括美观的开关和输入框。 */
.passphrase-bar {
    display: flex;
    align-items: center;
    gap: 10px;                  /* 原16px，缩小间距 */
    padding: 8px 16px 4px 16px; /* 原16px 24px 8px 24px，缩小内边距 */
    background: rgba(249,250,252,0.7);
    border-bottom: 1px solid #f0f4f9;
    position: relative;
    min-height: 36px;           /* 增加最小高度限制 */
}

.passphrase-bar label {
    margin: 0;
    font-size: 14px;
    color: #444;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 口令输入框样式 */
#passphraseInput {
    flex: 1;
    min-width: 120px;
    max-width: none;
    padding: 7px 14px;
    border-radius: 12px;
    border: 1px solid #dcdfe6;
    font-size: 14px;
    color: #444;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
#passphraseInput:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64,158,255,0.15);
}

/* 新增：密码显示切换按钮样式 */
.password-toggle {
    margin-left: 8px;
    background: transparent;
    border: none;
    color: #909399;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #409eff;
    background-color: rgba(64, 158, 255, 0.1);
}

.password-toggle:active {
    transform: scale(0.95);
}

.password-toggle i {
    font-size: 16px;
}

/* 确保密码输入区域处于相对定位 */
.passphrase-bar {
    display: flex;
    align-items: center;
    gap: 10px;                  /* 原16px，缩小间距 */
    padding: 8px 16px 4px 16px; /* 原16px 24px 8px 24px，缩小内边距 */
    background: rgba(249,250,252,0.7);
    border-bottom: 1px solid #f0f4f9;
    position: relative;
    min-height: 36px;           /* 增加最小高度限制 */
}

/* 响应式调整 */
@media (max-width: 900px) {
    .upload .title,
    .filelist .title {
        min-height: 38px; /* 更小屏幕进一步缩小 */
        padding: 0 10px;
        font-size: 14px;
    }
    .gateway-selector,
    .passphrase-bar {
        padding: 6px 10px 3px 10px;
        min-height: 30px;
    }
}
@media (max-width: 480px) {
    .passphrase-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 10px 4px 10px;
    }
    
    .passphrase-input-wrapper {
        display: flex;
        align-items: center;
        width: 100%;
    }
    
    #passphraseInput {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1;
    }
    
    .password-toggle {
        margin-left: 8px;
        flex-shrink: 0;
    }
}

/* 密码提示框中的密码切换样式 */
#shareAccessPrompt .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #909399;
    cursor: pointer;
    padding: 5px;
}

/* Styles for the batch share passphrase modal */
#batchSharePassphraseModal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Darker overlay */
    display: flex; /* Use flexbox for centering */
    align-items: center; /* Vertical center */
    justify-content: center; /* Horizontal center */
}

#batchSharePassphraseModal .modal-content {
    background-color: #ffffff; /* Cleaner white background */
    margin: auto; /* Centering fallback */
    padding: 25px 30px; /* Increased padding */
    border: none; /* Remove border */
    width: 90%; /* Responsive width */
    max-width: 450px; /* Max width */
    border-radius: 12px; /* Softer corners */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); /* Enhanced shadow */
    text-align: left; /* Align text to left for better readability */
}

#batchSharePassphraseModal h3 {
    margin-top: 0;
    margin-bottom: 20px; /* More space below title */
    font-size: 18px; /* Slightly larger title */
    color: #333; /* Darker text color */
    text-align: center; /* Center the title */
}

#batchSharePassphraseModal .input-wrapper {
    margin-bottom: 20px; /* More space below input */
    position: relative; /* For password toggle positioning */
}

#batchSharePassphraseModal input[type="password"],
#batchSharePassphraseModal input[type="text"] { /* Allow text type for visibility toggle */
    width: 100%;
    padding: 12px 40px 12px 12px; /* Adjust padding for icon */
    border: 1px solid #dcdfe6;
    border-radius: 6px; /* Consistent border-radius */
    font-size: 14px;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    transition: border-color 0.3s ease;
}

#batchSharePassphraseModal input[type="password"]:focus,
#batchSharePassphraseModal input[type="text"]:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
    outline: none;
}

#batchSharePassphraseModal .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #909399;
    cursor: pointer;
    padding: 8px; /* Easier to click */
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#batchSharePassphraseModal .password-toggle:hover {
    color: #409eff;
}

#batchSharePassphraseModal .modal-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px; /* Space between buttons */
}

#batchSharePassphraseModal .modal-actions button {
    padding: 10px 20px; /* Standard padding */
    border-radius: 6px; /* Consistent border-radius */
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500; /* Slightly bolder text */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#batchSharePassphraseModal #confirmBatchSharePassphrase {
    background-color: #409eff;
    color: white;
}

#batchSharePassphraseModal #confirmBatchSharePassphrase:hover {
    background-color: #66b1ff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2); /* Subtle shadow on hover */
}

#batchSharePassphraseModal #cancelBatchSharePassphrase {
    background-color: #f0f2f5; /* Lighter background for cancel */
    color: #606266; /* Darker text for cancel */
    border: 1px solid #dcdfe6; /* Subtle border */
}

#batchSharePassphraseModal #cancelBatchSharePassphrase:hover {
    background-color: #e4e7ed;
    border-color: #c0c4cc;
}

/* 优化 filelist title 在移动端的布局 */
@media (max-width: 768px) {
    .filelist .title {
        flex-direction: column;
        gap: 8px;
        padding: 10px 8px;
    }
    
    .title-text {
        text-align: center;
        margin-bottom: 5px;
    }
    
    .batch-actions {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .short-url-wrapper,
    .toggle-all-wrapper {
        min-width: fit-content;
        flex-shrink: 0;
    }
    
    .short-url-label, 
    .toggle-all-label {
        font-size: 12px;
        white-space: nowrap;
    }
    
    .action-button, 
    .copyall {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 60px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .filelist .title {
        padding: 8px 6px;
    }
    
    .batch-actions {
        gap: 4px;
    }
    
    .short-url-wrapper,
    .toggle-all-wrapper {
        margin-right: 2px;
    }
    
    .short-url-label, 
    .toggle-all-label {
        font-size: 11px;
        margin-left: 3px;
    }
    
    #enableShortUrl, 
    #toggleAllFiles {
        width: 14px;
        height: 14px;
    }
    
    .action-button, 
    .copyall {
        padding: 5px 6px;
        font-size: 11px;
        min-width: 50px;
        border-radius: 4px;
    }
    
    .title-text {
        font-size: 14px;
    }
    
    .title-text i {
        margin-right: 5px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .batch-actions {
        gap: 3px;
    }
    
    .short-url-label, 
    .toggle-all-label {
        font-size: 10px;
        max-width: 35px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .action-button, 
    .copyall {
        padding: 4px 5px;
        font-size: 10px;
        min-width: 45px;
    }
    
    .action-button span,
    .copyall span {
        display: none; /* 超小屏幕时只显示图标 */
    }
    
    .action-button i,
    .copyall i {
        margin-right: 0;
    }
}

/* Toast notification styling */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    max-width: 320px;
}

@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .toast {
        width: 100%;
    }
}

.toast {
    background-color: rgba(51, 51, 51, 0.9);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: toast-in-right 0.7s;
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast.success {
    background-color: rgba(40, 167, 69, 0.9);
    border-left: 5px solid #1e7e34;
}

.toast.error {
    background-color: rgba(220, 53, 69, 0.9);
    border-left: 5px solid #bd2130;
}

.toast.info {
    background-color: rgba(23, 162, 184, 0.9);
    border-left: 5px solid #117a8b;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
}

.toast-close {
    cursor: pointer;
    margin-left: 10px;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes toast-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out-right {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.hide {
    animation: toast-out-right 0.7s forwards;
}

#footer {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    text-align: center;
    padding: 12px; /* Reduced from 20px to 12px */
    width: 100%;
    box-sizing: border-box; 
    margin-top: auto; 
}

#footer .info {
    margin-bottom: 6px; /* Reduced from 10px to 6px */
}

#footer a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: color 0.2s;
    margin: 0 8px; /* Adjusted horizontal margin for links */
}

/* Add loading animations */
@keyframes pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.filelist .list .item.uploading {
    animation: pulse 1.5s infinite ease-in-out;
}

/* Add touch specific enhancements for mobile */
@media (hover: none) and (pointer: coarse) {
    /* 增加触摸目标尺寸，更容易点击 */
    .select-group select,
    .copyall,
    .copy-btn,
    .filelist .list .item .file .link {
        min-height: 40px;
        min-width: 40px;
    }
    
    /* 增大下拉菜单选项的可点击区域 */
    .select-group select {
        font-size: 16px; /* 避免iOS自动缩放 */
        padding: 10px 12px;
        padding-right: 30px;
        background-size: 12px auto;
        background-position: right 12px top 50%;
    }
    
    /* 增加触摸反馈 */
    .select-group select:active,
    .copyall:active,
    .copy-btn:active {
        transform: scale(0.96);
        transition: transform 0.1s;
    }
    .upload .content:active {
        background-color: #f0f8ff;
        transform: scale(0.98);
    }
    
    .upload .content:active .icon {
        transform: translateY(-5px);
        fill: #409eff;
    }
    
    .filelist .list .item .file .link {
        padding: 10px;
        width: 40px;
        height: 40px;
    }
    
    .filelist .list .item .file .link svg {
        width: 20px;
        height: 20px;
    }
    
    .copy-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* Add active state feedback for mobile taps */
    .copy-btn:active,
    .select-group select:active,
    .copyall:active,
    .filelist .list .item .file .link:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
    
    /* Improved scrolling for touch devices */
    .filelist .list {
        -webkit-overflow-scrolling: touch;
    }
}

/* Site header styling */
.site-header {
    width: 100%;
    max-width: 950px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    position: relative;
    padding: 0 10px 0 10px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.site-logo img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Header navigation styles */
.header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 10; /* Ensure nav is above other elements */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

.lang-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    position: relative; /* Changed from absolute positioning */
}

.lang-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lang-icon i {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px); /* Position below the language icon */
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.lang-dropdown a:hover {
    background-color: #f5f5f5;
}

.lang-dropdown a.active {
    background-color: #409eff;
    color: white;
}

/* Mobile adjustments for header navigation */
@media (max-width: 480px) {
    .site-header {
        padding: 0 5px;
        gap: 8px; /* Add gap between logo and nav */
    }
    
    .site-logo {
        font-size: 18px;
        gap: 8px;
    }
    
    .site-logo img {
        width: 28px;
        height: 28px;
    }
    
    .header-nav {
        gap: 8px;
    }
    
    .nav-link {
        padding: 6px 8px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .nav-link span {
        display: none; /* Hide text on very small screens, show only icon */
    }
    
    .lang-icon {
        width: 32px;
        height: 32px;
    }
    
    .lang-dropdown {
        right: -5px; /* Adjust positioning for small screens */
        min-width: 120px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .site-header {
        padding: 0 2px;
    }
    
    .header-nav {
        gap: 4px;
    }
    
    .nav-link {
        padding: 4px 6px;
        min-width: 32px; /* Ensure minimum touch target */
    }
    
    .lang-icon {
        width: 28px;
        height: 28px;
    }
}

/* 确保密码输入区域处于相对定位 */
.passphrase-bar {
    display: flex;
    align-items: center;
    gap: 10px;                  /* 原16px，缩小间距 */
    padding: 8px 16px 4px 16px; /* 原16px 24px 8px 24px，缩小内边距 */
    background: rgba(249,250,252,0.7);
    border-bottom: 1px solid #f0f4f9;
    position: relative;
    min-height: 36px;           /* 增加最小高度限制 */
}

/* 响应式调整 */
@media (max-width: 900px) {
    .upload .title,
    .filelist .title {
        min-height: 38px; /* 更小屏幕进一步缩小 */
        padding: 0 10px;
        font-size: 14px;
    }
    .gateway-selector,
    .passphrase-bar {
        padding: 6px 10px 3px 10px;
        min-height: 30px;
    }
}
@media (max-width: 480px) {
    .passphrase-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 10px 10px 4px 10px;
    }
    
    .passphrase-input-wrapper {
        display: flex;
        align-items: center;
        width: 100%;
    }
    
    #passphraseInput {
        width: 100%;
        min-width: 0;
        max-width: none;
        flex: 1;
    }
    
    .password-toggle {
        margin-left: 8px;
        flex-shrink: 0;
    }
}

/* 密码提示框中的密码切换样式 */
#shareAccessPrompt .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #909399;
    cursor: pointer;
    padding: 5px;
}

/* Styles for the batch share passphrase modal */
#batchSharePassphraseModal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* Darker overlay */
    display: flex; /* Use flexbox for centering */
    align-items: center; /* Vertical center */
    justify-content: center; /* Horizontal center */
}

#batchSharePassphraseModal .modal-content {
    background-color: #ffffff; /* Cleaner white background */
    margin: auto; /* Centering fallback */
    padding: 25px 30px; /* Increased padding */
    border: none; /* Remove border */
    width: 90%; /* Responsive width */
    max-width: 450px; /* Max width */
    border-radius: 12px; /* Softer corners */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); /* Enhanced shadow */
    text-align: left; /* Align text to left for better readability */
}

#batchSharePassphraseModal h3 {
    margin-top: 0;
    margin-bottom: 20px; /* More space below title */
    font-size: 18px; /* Slightly larger title */
    color: #333; /* Darker text color */
    text-align: center; /* Center the title */
}

#batchSharePassphraseModal .input-wrapper {
    margin-bottom: 20px; /* More space below input */
    position: relative; /* For password toggle positioning */
}

#batchSharePassphraseModal input[type="password"],
#batchSharePassphraseModal input[type="text"] { /* Allow text type for visibility toggle */
    width: 100%;
    padding: 12px 40px 12px 12px; /* Adjust padding for icon */
    border: 1px solid #dcdfe6;
    border-radius: 6px; /* Consistent border-radius */
    font-size: 14px;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
    transition: border-color 0.3s ease;
}

#batchSharePassphraseModal input[type="password"]:focus,
#batchSharePassphraseModal input[type="text"]:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
    outline: none;
}

#batchSharePassphraseModal .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #909399;
    cursor: pointer;
    padding: 8px; /* Easier to click */
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

#batchSharePassphraseModal .password-toggle:hover {
    color: #409eff;
}

#batchSharePassphraseModal .modal-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px; /* Space between buttons */
}

#batchSharePassphraseModal .modal-actions button {
    padding: 10px 20px; /* Standard padding */
    border-radius: 6px; /* Consistent border-radius */
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500; /* Slightly bolder text */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#batchSharePassphraseModal #confirmBatchSharePassphrase {
    background-color: #409eff;
    color: white;
}

#batchSharePassphraseModal #confirmBatchSharePassphrase:hover {
    background-color: #66b1ff;
    box-shadow: 0 2px 8px rgba(64, 158, 255, 0.2); /* Subtle shadow on hover */
}

#batchSharePassphraseModal #cancelBatchSharePassphrase {
    background-color: #f0f2f5; /* Lighter background for cancel */
    color: #606266; /* Darker text for cancel */
    border: 1px solid #dcdfe6; /* Subtle border */
}

#batchSharePassphraseModal #cancelBatchSharePassphrase:hover {
    background-color: #e4e7ed;
    border-color: #c0c4cc;
}
