/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card h2 {
    color: #667eea;
    margin-bottom: 20px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-frozen {
    color: #dc3545;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #5a67d8;
}

.btn-back {
    background: #6c757d;
    margin-bottom: 20px;
}

.btn-back:hover {
    background: #5a6268;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
    margin: 10px 0;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9em;
}

.search-box {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.search-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.search-btn:hover {
    background: #5a67d8;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.pagination a, .pagination span {
    padding: 8px 16px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #667eea;
    border-radius: 5px;
}

.pagination a:hover {
    background-color: #667eea;
    color: white;
}

.pagination .current {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

.table th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 10;
}

.export-btn {
    background: #28a745 !important;
    margin-left: 10px;
}

.export-btn:hover {
    background: #218838 !important;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 10px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.btn-generate {
    background: #ff6b6b !important;
}

.btn-generate:hover {
    background: #ee5a52 !important;
}

.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

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

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.card-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.card-item {
    padding: 5px;
    border-bottom: 1px solid #eee;
    font-family: monospace;
}

.card-item:last-child {
    border-bottom: none;
}

.format-option {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.format-option:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.format-option.selected {
    border-color: #667eea;
    background-color: #667eea;
    color: white;
}

.import-area {
    border: 2px dashed #ddd;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.import-area:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
}

.import-area.drag-over {
    border-color: #667eea;
    background-color: #e3f2fd;
}

.file-input {
    display: none;
}

.file-label {
    display: inline-block;
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
    font-size: 0.9em;
}

.file-label:hover {
    background: #5a67d8;
}

.preview-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.preview-item {
    padding: 5px;
    border-bottom: 1px solid #eee;
    font-family: monospace;
    font-size: 0.9em;
}

.preview-item:last-child {
    border-bottom: none;
}

.import-summary {
    background: #e9ecef;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-size: 0.9em;
}

.btn-generate-modal {
    background: #ff6b6b !important;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-top: 20px;
}

.btn-generate-modal:hover {
    background: #ee5a52 !important;
}

.generate-btn {
    background: #28a745 !important;
    margin-left: 10px;
}

.generate-btn:hover {
    background: #218838 !important;
}

.filter-form {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.bulk-action-form {
    margin-top: 20px;
}

.bulk-actions {
    margin-bottom: 15px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 5px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.bulk-actions .btn {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-danger {
    background: #dc3545 !important;
}

.btn-danger:hover {
    background: #c82333 !important;
}

.btn-small {
    padding: 3px 8px !important;
    font-size: 12px !important;
}

.card-checkbox, .recode-checkbox, .point-checkbox {
    transform: scale(1.2);
    margin: 0;
}

.table td:last-child {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table th, .table td {
        padding: 8px;
        font-size: 14px;
    }
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.format-option {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.format-option:hover {
    border-color: #667eea;
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.format-option.selected {
    border-color: #667eea;
    background-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.preview-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

.preview-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.preview-item:last-child {
    border-bottom: none;
}

.form-hint code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.modal-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.modal-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.modal-tab.active {
    border-bottom-color: #667eea;
    color: #667eea;
}

.modal-tab-content {
    display: none;
}

.modal-tab-content.active {
    display: block;
}

@media (max-width: 768px) {
    .format-options {
        grid-template-columns: 1fr;
    }
    
    .modal-tabs {
        flex-direction: column;
    }
    
    .modal-tab {
        width: 100%;
        text-align: center;
    }
}

/* 登录页面样式 */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #667eea;
    margin-bottom: 10px;
}

.verification-input {
    font-size: 18px;
    letter-spacing: 5px;
    text-align: center;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-login:hover {
    background: #5a67d8;
}

.resend-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.resend-btn:hover {
    background: #5a6268;
}

.error-msg {
    color: #dc3545;
    text-align: center;
    margin-top: 10px;
}

.success-msg {
    color: #28a745;
    text-align: center;
    margin-top: 10px;
}

.status-point {
    color: #ffc107;
    font-weight: 600;
}

.status-single {
    color: #17a2b8;
    font-weight: 600;
}

.status-login {
    color: #6f42c1;
    font-weight: 600;
}
/* style.css (添加用户基本信息美化样式) */
/* ... 原有样式保持不变 ... */

/* 用户基本信息美化 */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
}

.user-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.user-info-icon {
    font-size: 2.5em;
    margin-right: 15px;
    flex-shrink: 0;
}

.user-info-content h3 {
    color: #667eea;
    margin-bottom: 5px;
    font-size: 1.1em;
    font-weight: 600;
}

.user-info-content p {
    color: #6c757d;
    font-size: 1em;
    margin: 0;
    word-break: break-all;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .user-info-grid {
        grid-template-columns: 1fr;
    }
    
    .user-info-card {
        padding: 15px;
    }
    
    .user-info-icon {
        font-size: 2em;
        margin-right: 10px;
    }
}

/* style.css (调整表格列宽以适应新结构) */
/* style.css (调整表格列宽以适应新结构，保持图标样式) */
/* ... 原有样式保持不变 ... */

/* 应用图标容器 */
.icon-container {
    display: inline-block;
    width: 50px;
    height: 50px;
    vertical-align: middle;
    margin-right: 5px;
}

/* 应用图标样式 */
.app-icon-small {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    object-fit: contain;
    box-sizing: border-box;
    vertical-align: middle;
}

/* 调整表格列宽 */
.table th:first-child,
.table td:first-child {
    min-width: 150px; /* 应用名称列，包含图标和名称 */
}

.table th:nth-child(2),
.table td:nth-child(2) {
    min-width: 120px; /* 卡密统计列 */
}

.table th:nth-child(3),
.table td:nth-child(3) {
    min-width: 100px; /* 认证模式列 */
}

.table th:nth-child(4),
.table td:nth-child(4) {
    min-width: 200px; /* 操作列 */
}

/* ... 原有样式保持不变 ... */