/* 全局设置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f4f7fa;
    color: #333;
    line-height: 1.6;
    padding: 0 20px;
}

.member_body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f2f5;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 300px;
    text-align: center;
}

input {
    width: 100%;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 0.5rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}

button:hover {
    background: #45a049;
}

p {
    margin-top: 1rem;
}

a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#wechat-qr {
    max-width: 200px;
    margin: 10px auto;
}

/* ========== 头部样式修改 ========== */
/* 头部容器 */
header {
    background: linear-gradient(to right, #2e7d32, #66bb6a);
    color: white;
    padding: 20px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 标题靠左 */
header h1 {
    font-size: 1.8em;
    margin: 0;
    text-align: left;
    flex: 1;
    padding-right: 20px;
}

/* 用户状态容器 - 两行布局 */
.user-status {
    position: relative; /* 不再 absolute，避免移动端错位 */
    font-size: 14px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    min-width: 200px;
}

/* 用户状态第一行：手机号 + 退出 */
.user-line-1 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

/* 用户状态第二行：状态 + 续费 */
.user-line-2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

/* 状态标签样式 */
.status-active {
    color: #c8e6c9;
    font-weight: 500;
}
.status-expired,
.status-inactive {
    color: #ffcdd2;
    font-weight: 500;
}

/* 按钮样式 */
.login-button, .register-button, .logout-button, .renew-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.login-button:hover, .register-button:hover, .logout-button:hover, .renew-button:hover {
    background-color: #45a049;
}

/* 响应式：小屏幕堆叠 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: stretch;
    }
    .user-status {
        align-items: flex-start;
        margin-top: 10px;
    }
    .user-line-1,
    .user-line-2 {
        justify-content: flex-start;
    }
}

/* 九宫格容器 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #2e7d32, #66bb6a);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2e7d32;
}

.card h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2e7d32;
}

.card p {
    font-size: 0.95rem;
    color: #666;
}

.card .source {
  font-size: 0.8em;
  color: #7f8c8d;
  margin-top: 6px;
  font-style: italic;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.card-tags .tag {
    font-size: 0.75em;
    color: #555;
    background-color: #f0f4f8;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    white-space: nowrap;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #e8f5e9;
    color: #333;
    border-radius: 10px;
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
}

/* 三列布局 */
.three-column-layout {
    display: grid;
    grid-template-columns: 30% 35% 35%;
    gap: 10px;
    margin: 10px auto;
    padding: 0 10px;
}

.sidebar {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.content {
    width: 100%;
}

.right-panel {
    position: sticky;
    top: 80px;
}

.station-list li {
    cursor: pointer;
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
}

.station-list li:hover {
    background-color: #f0f0f0;
}

.chart-container {
    background: #fafafa;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}


/*-------------------------------------------------------------------------------*/

.sim-result canvas {
    margin-top: 15px;
}

@media (max-width: 1200px) {
    .three-column-layout {
        grid-template-columns: 1fr;
    }
    .right-panel {
        position: relative;
    }
}

.station-info-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #4CAF50;
}

.station-info-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4em;
}

.station-info-header p {
    margin: 5px 0 0;
    color: #7f8c8d;
    font-size: 1.1em;
}

.highlight-marker {
    background-color: #FF5722;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,87,34,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255,87,34,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,87,34,0); }
}

.sowing-date-selector {
    margin-bottom: 10px;
}

.sowing-date-selector button {
    margin-right: 8px;
    padding: 4px 8px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
}

.sowing-date-selector button.active {
    background-color: #ff6600;
    color: white;
    font-weight: bold;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    transition: transform 0.3s ease;
}

.modal-content:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.modal-content.wide {
    max-width: 95%;
    max-height: 200vh;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.chart-blur {
    position: relative;
    filter: blur(5px);
    pointer-events: none;
}

.chart-blur::after {
    content: "此图表为会员专属，升级账户以查看完整数据";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: red;
    font-size: 16px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 10;
    text-align: center;
}
/* 续费模态框 */
.renew-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.renew-modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.renew-close {
    color: #333;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.renew-close:hover,
.renew-close:focus {
    color: #000;
    text-decoration: none;
}

.renew-modal-content h2 {
    color: #2e7d32;
    margin-bottom: 20px;
}

.renew-modal-content input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.renew-modal-content button {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.renew-modal-content button:hover {
    background-color: #45a049;
}

.renew-modal-content p {
    margin: 10px 0;
}
/* 管理页面布局 */
.admin-container {
    display: flex;
    min-height: calc(100vh - 100px - 60px); /* 减去 header 和 footer 高度 */
}

.admin-sidebar {
    width: 200px;
    background-color: #f5f5f5;
    padding: 20px;
    border-right: 1px solid #ddd;
}

.admin-sidebar h3 {
    color: #2e7d32;
    margin-bottom: 20px;
}

.admin-sidebar ul {
    list-style: none;
    padding: 0;
}

.admin-nav-item {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 5px;
}

.admin-nav-item:hover {
    background-color: #e0e0e0;
}

.admin-nav-item.active {
    background-color: #4CAF50;
    color: white;
}

.admin-main {
    flex: 1;
    padding: 20px;
}

.admin-section {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.admin-table th, .admin-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.admin-table th {
    background-color: #4CAF50;
    color: white;
}

.admin-button {
    background-color: #4CAF50;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius:  ascended
    cursor: pointer;
    margin-right: 5px;
}

.admin-button.delete {
    background-color: #f44336;
}

.admin-button:hover {
    background-color: #45a049;
}

.admin-button.delete:hover {
    background-color: #d32f2f;
}

/* 管理模态框 */
.admin-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.admin-modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-close {
    color: #333;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.admin-close:hover,
.admin-close:focus {
    color: #000;
    text-decoration: none;
}

.admin-modal-content h2 {
    color: #2e7d32;
    margin-bottom: 20px;
}

.admin-modal-content input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.admin-modal-content button {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

.admin-modal-content button:hover {
    background-color: #45a049;
}

.admin-modal-content p {
    margin: 10px 0;
}



