/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
}

/* 标题样式 */
.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

/* 卡片样式 */
.toolbar-card,
.table-card,
.form-card,
.storage-status-bar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* 数据存储状态栏 */
.storage-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
}

.storage-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.storage-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 统计卡片样式 */
.stats-container {
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-align: center;
}

.stat-card-total {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-title {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
}

/* 统计列表样式（一列显示） */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 300px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.stat-row .stat-title {
    font-size: 14px;
    margin-bottom: 0;
    opacity: 0.95;
}

.stat-row .stat-value {
    font-size: 16px;
    font-weight: bold;
}

.stat-row-total {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin-top: 5px;
}

/* 工具栏样式 */
.toolbar-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.toolbar-section {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-large {
    padding: 12px 30px;
    font-size: 16px;
}

/* 表格样式 */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #dee2e6;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

/* 记录行样式 */
.confirmed-record {
    background-color: #e8f5e9;
}

.unconfirmed-record {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
}


/* 状态徽章样式 */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    margin-bottom: 5px;
}

.status-badge.unconfirmed {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.confirmed {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 10px;
}

.empty-hint {
    font-size: 14px;
    color: #bdc3c7;
}

/* 表单样式 */
.form-card h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #667eea;
}

.form-content {
    display: block;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group select {
    height: 45px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[readonly] {
    background-color: #f8f9fa;
    cursor: pointer;
}

.form-group small {
    font-size: 12px;
    color: #95a5a6;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* 打款指令模态框内的 pre 样式 */
#paymentInstructions pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #dee2e6;
    max-height: 500px;
    overflow-y: auto;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #dee2e6;
}

.modal-header h2 {
    color: #667eea;
    font-size: 20px;
}

.close-btn {
    font-size: 30px;
    font-weight: bold;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 20px;
}

/* 绑定选项样式 */
.binding-options {
    margin: 15px 0;
}

.binding-option {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

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

.binding-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.binding-option label {
    cursor: pointer;
    flex: 1;
}

/* 绑定关系管理样式 */
.modal-large {
    max-width: 900px;
    width: 90%;
}

.binding-management-toolbar {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.add-binding-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #dee2e6;
}

.binding-list {
    max-height: 500px;
    overflow-y: auto;
}

.binding-group {
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.binding-group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 15px;
}

.binding-group-items {
    background: white;
}

.binding-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

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

.binding-item:hover {
    background: #f8f9fa;
}

.binding-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.binding-arrow {
    color: #667eea;
    font-weight: bold;
}

.binding-address {
    font-family: monospace;
    color: #495057;
    font-size: 13px;
}

.binding-item-actions {
    display: flex;
    gap: 8px;
}

.binding-empty {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
}

.binding-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* 网站管理样式 */
.website-list {
    max-height: 500px;
    overflow-y: auto;
}

.website-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s;
}

.website-item:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.website-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.website-item-actions {
    display: flex;
    gap: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 24px;
    }

    .toolbar-card {
        flex-direction: column;
    }

    .toolbar-section {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 8px 5px;
    }
}
