/* static/alipay_theme.css */

/* --- 全局和基础样式 --- */
body {
    background-color: #F5F5F9; /* 支付宝浅灰色背景 */
    color: #333; /* 主要文字颜色 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    display: block;
}

.container {
    width: 100%;
    background-color: #ffffff; /* 白色卡片背景 */
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

h1, h2, h3 {
    color: #000;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-top: 0;
}

h1 {
    font-size: 1.8rem;
}

h2 {
    font-size: 1.4rem;
    margin-top: 20px;
}

a {
    color: #1677FF; /* 支付宝蓝 */
    text-decoration: none;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.8;
}

/* --- 表单和输入框样式 --- */
.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #fdfdfd;
    color: #333;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: #1677FF;
    box-shadow: 0 0 5px rgba(22, 119, 255, 0.2);
}

/* --- 按钮样式 --- */
.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #1677FF; /* 支付宝蓝 */
    color: #ffffff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-danger {
    background-color: #FF4D4F; /* 红色，用于停止按钮 */
    color: #ffffff;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* --- 卡片和信息展示 --- */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-top: 0; /* 在新布局中由 gap 控制间距 */
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-header {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.info-item {
    background-color: #F5F5F9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.info-item .label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-item .value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.value.win { color: #52C41A; } /* 绿色表示盈利 */
.value.loss { color: #FF4D4F; } /* 红色表示亏损 */
.value.single { color: #1677FF; } /* 蓝色表示单 */
.value.double { color: #FF4D4F; } /* 红色表示双 */

/* --- 表格样式 --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

th, td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background-color: #fafafa;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background-color: #fafafa;
}

tbody tr:hover {
    background-color: #f0f5ff;
}

/* --- 日志样式 --- */
.logs-container {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    height: 300px;
    overflow-y: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #555;
}

.logs-container p {
    margin: 0 0 5px 0;
    white-space: pre-wrap;
    word-break: break-all;
}
