/* 重置样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* 容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px 16px;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 60px;
}

.header h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-align: center;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    padding: 8px;
    margin-right: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.back-btn svg {
    width: 24px;
    height: 24px;
}

/* 主内容 */
.main {
    flex: 1;
    padding: 16px;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.card-content {
    padding: 16px;
}

/* 输入组 */
.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: #007bff;
}

.input-group button {
    padding: 12px 16px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.input-group button:hover {
    opacity: 0.9;
}

.input-group button:active {
    transform: translateY(1px);
}

/* 验证消息 */
.validation-message {
    font-size: 12px;
    color: #ff4444;
    margin-top: 4px;
    min-height: 16px;
}

.validation-message.success {
    color: #00aa00;
}

/* 徽章 */
.badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 描述文本 */
.description {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

/* 按钮 */
.btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn.secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn.secondary:hover {
    background: #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff4757 100%);
}

.btn.success {
    background: linear-gradient(135deg, #2ed573 0%, #7bed9f 100%);
}

/* 加载中遮罩 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-overlay p {
    color: white;
    font-size: 16px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* 对话框 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.dialog {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: fadeIn 0.3s ease-out;
}

.dialog-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dialog-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.close-btn {
    background: none;
    border: none;
    color: #999;
    padding: 4px;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: #f0f0f0;
}

.close-btn svg {
    width: 20px;
    height: 20px;
}

.dialog-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.dialog-actions {
    padding: 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.dialog-actions button {
    height: 47px;
    padding: 12px 2px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cancel-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.cancel-btn:hover {
    background: #e9ecef;
}

.confirm-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
   width:100% ;
   height: 100%;
    background-size: contain!important;

}

.confirm-btn:hover {
    opacity: 0.9;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 底部 */
.footer {
    background: #f8f9fa;
    padding: 16px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.footer p {
    color: #999;
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 375px) {
    .container {
        max-width: 100%;
    }

    .main {
        padding: 12px;
    }

    .card-content,
    .card-header {
        padding: 12px;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group button {
        margin-top: 8px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

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

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

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* 语言切换 */
.language-switch {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.lang-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.lang-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}