body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 默认样式，适用于大屏幕 */
.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-top: 20px;
}
.container-app {
    max-width: 500px;
    margin: 0 auto;
    border-radius: 4px;
    margin-top: 20px;
}

/* 在小屏幕上覆盖默认样式 */
@media (max-width: 767px) {
    .container {
        max-width: 95%;
    }
    .container-app{
        max-width: 95%;
    }
    
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group label {
    font-weight: bold;
}

.custom-file-label {
    cursor: pointer;
    color: #495057;
    border-radius: 4px;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background-color: transparent;
    border: 1px solid #ced4da;
}

.custom-file-label::after {
    content: '选择文件';
    display: inline-block;
    padding: 0 8px;
    line-height: 2;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    color: #6c757d;
    cursor: pointer;
    float: right;
}

.custom-file-label[aria-selected="true"]::after {
    content: '更改文件';
}

.custom-file-label[aria-selected="false"]::after {
    content: '选择文件';
}

.loading {
    display: none;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001; /* Higher than the overlay */
}

.loading::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Lower than the loading text */
}

.toptext {
    margin-bottom: 10px;
    margin-top: 10px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 10px;
}

.logo-text {
    font-weight: bold;
}

.logo-subtext {
    font-size: 12px;
    color: #6c757d;
}

/* 提示框样式 */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.alert-box {
    max-width: 90%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 20px;
    text-align: center;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* 文件传区域样式 */
.upload-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.upload-box {
    flex: 1;
    max-width: 180px;
}

.upload-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
}

.upload-area {
    width: 100%;
    aspect-ratio: 1;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    padding: 12px;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-area:hover {
    transform: translateY(-2px);
    border-color: #007bff;
    background-color: #f0f7ff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.upload-area:active {
    transform: translateY(0);
}

.upload-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.upload-area:hover .upload-icon {
    transform: scale(1.1);
}

.upload-area.has-file .upload-icon {
    animation: fileUploaded 0.5s ease;
}

.upload-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
    max-width: 90%;
    text-align: center;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.selected-files {
    position: absolute;
    bottom: 8px;
    left: 5px;
    right: 5px;
    width: calc(100% - 10px);
    text-align: center;
    font-size: 12px;
    color: #28a745;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 3px 5px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    max-width: 90%;
    margin: 0 auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 当文件被选中时的样式 */
.upload-area.has-file {
    padding-bottom: 25px;
}

.upload-area.has-file .upload-icon {
    transform: scale(0.8);
    margin-bottom: 4px;
}

.upload-area.has-file .upload-text {
    font-size: 11px;
    margin-top: 4px;
}

/* 响应式布局 */
@media (max-width: 480px) {
    .upload-container {
        flex-direction: row;
        max-width: 100%;
    }
    
    .upload-box {
        max-width: 160px;
    }
    
    .upload-area {
        aspect-ratio: 1;
    }
}

/* 应用切换按钮样式 */
.app-switcher {
    margin-bottom: 20px;
    padding: 8px; /* 添加内边距让整体更宽松 */
}

.app-switcher .btn-group {
    display: flex;
    justify-content: flex-start; /* 从左开始排列 */
    width: 100%;
    gap: 8px; /* 按钮之间的间距 */
    overflow-x: auto; /* 水平滚动 */
    padding-bottom: 4px; /* 滚动条空间 */
    scrollbar-width: thin; /* Firefox 支持 */
    scrollbar-color: #ccc transparent;
    -webkit-overflow-scrolling: touch; /* iOS 惯性滑动 */
}

/* Chrome/Safari 滚动条美化 */
.app-switcher .btn-group::-webkit-scrollbar {
    height: 6px;
}

.app-switcher .btn-group::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.app-switcher .btn-group::-webkit-scrollbar-track {
    background: transparent;
}

.app-switcher .btn {
    position: relative;
    overflow: hidden;
    padding: 12px 24px; /* 稍微增大内边距 */
    border-radius: 8px; /* 圆角更柔和 */
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff, #f8f9fa); /* 微妙渐变背景 */
    border: 1px solid #dee2e6; /* 添加细边框 */
    font-weight: 500; /* 字体稍粗 */
    color: #495057; /* 更柔和的文字颜色 */
    white-space: nowrap; /* 防止换行 */
    flex-shrink: 0; /* 保持按钮大小不缩小 */
}




.app-switcher .btn-outline-primary {
    background: transparent;
    border: 2px solid #007bff; /* 更粗的边框 */
    color: #007bff;
    transition: all 0.3s ease;
}

.app-switcher .btn-outline-primary:hover {
    background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,123,255,0.05));
    border-color: #0056b3; /* 悬停时边框颜色加深 */
    color: #0056b3;
    box-shadow: 0 4px 12px rgba(0,123,255,0.2); /* 带主题色的阴影 */
}

/* 激活状态 */
.app-switcher .btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
   
}

/* 响应式调整 */
@media (max-width: 768px) {
    .app-switcher .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}


/* 密码输入框样式优化 */
.form-control {
    height: 45px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
    transition: all 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.5;
    transform: translateX(10px);
}

/* 签名按钮样式优化 */
.btn-primary {
    height: 45px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
    background: linear-gradient(45deg, #0056b3, #007bff);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* 添加关键帧动画 */
@keyframes fileUploaded {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(0.8); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 错误状态动画 */
.form-control.is-invalid {
    animation: shake 0.3s ease-in-out;
}

/* 文件选择成功动画 */
.selected-files {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 应用切换按钮优化 */
.app-switcher .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.app-switcher .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.app-switcher .btn:hover::after {
    width: 200%;
    height: 200%;
}

/* 应用信息卡片样式 */
.app-info-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.app-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.logo-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.logo {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,123,255,0.2) 0%, rgba(0,123,255,0) 70%);
    border-radius: 16px;
    z-index: 1;
    opacity: 0;
    transition: all 0.3s ease;
}

.logo-wrapper:hover .logo {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.15);
}

.logo-wrapper:hover .logo-glow {
    opacity: 1;
    width: 120%;
    height: 120%;
}

.app-info {
    flex-grow: 1;
    min-width: 0;
}

.app-name {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.app-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.build-id {
    font-size: 13px;
    color: #007bff;
    font-weight: 500;
    background: rgba(0, 123, 255, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 2px;
}

.app-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .app-info-card {
        padding: 16px;
        border-radius: 12px;
    }

    .logo-wrapper {
        width: 56px;
        height: 56px;
    }

    .app-name {
        font-size: 18px;
    }

    .build-id {
        font-size: 12px;
    }

    .app-description {
        font-size: 13px;
    }
}

/* 添加一些微妙的动画效果 */
@keyframes cardFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

.app-info-card:hover {
    animation: cardFloat 3s ease-in-out infinite;
}

/* 快捷操作按钮容器 */
.quick-actions {
    max-width: 500px;
    margin: -10px auto 20px;
    overflow-x: auto; /* 启用水平滚动 */
    white-space: nowrap; /* 防止按钮换行 */
}

/* 调整按钮容器样式 */
.actions-container {
    display: inline-flex; /* 使用inline-flex以便在父容器中水平滚动 */
    justify-content: flex-start; /* 左对齐按钮 */
    gap: 12px;
    flex-wrap: nowrap;
}

.action-btn {
    flex: 0 0 auto; /* 确保按钮不会缩小 */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 123, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 响应式调整 */
@media (max-width: 480px) {
    .quick-actions {
        padding: 0 5px;
    }
    
    .actions-container {
        gap: 8px;
    }
    
    .action-btn {
        padding: 12px 12px; /* 保持按钮原本大小 */
    }
    
    .action-icon {
        font-size: 24px; /* 保持图标原本大小 */
        margin-bottom: 6px;
    }
    
    .action-text {
        font-size: 13px; /* 保持文本原本大小 */
    }
}
/* 自定义按钮样式 */
.btn-app-switch {
    transition: all 0.3s ease;
    font-weight: 500;
}

/* 未选中状态 */
.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background-color: #fff;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

/* 选中状态 */
.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary.active {
    background-color: #0056b3; /* 稍微深一点的蓝色，表示选中 */
    border-color: #0056b3;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* 添加轻微发光效果 */
}

/* 按钮组样式优化 */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}