
/* 仪表盘容器 */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(to bottom, rgb(9, 39, 55), rgb(6, 7, 67));
    padding-top: 70px; /* 为固定定位的header留出空间 */
    position: relative;
}

/* 调整按钮在深色背景下的样式 */
.dashboard-header .btn-primary,
.dashboard-header .btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: all 0.3s ease;
}

.dashboard-header .btn-primary:hover,
.dashboard-header .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dashboard-header #contactSupportBtn {
    background-color: rgba(33, 150, 243, 0.8);
    border: none;
}

.dashboard-header #contactSupportBtn:hover {
    background-color: rgba(33, 150, 243, 1);
}

.dashboard-header #logoutBtn {
    background-color: rgba(255, 255, 255, 0.1);
}

.dashboard-header #logoutBtn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* 仪表盘头部 */
.dashboard-header {
    background: linear-gradient(to right, rgb(9, 39, 55), rgb(6, 7, 67));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dashboard-header .container {
    /*max-width: 1200px;*/
    margin: 0 2rem;
    padding: 0 2rem;
    height: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
}

.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.user-menu-trigger:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#userEmail {
    color: #fff;
}

.arrow-down {
    border: solid #fff;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-top: -3px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(9, 39, 55, 0.95);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    min-width: 200px;
    z-index: 1000;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: block;
    padding: 12px 16px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
    cursor: pointer;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.contact-support {
    color: #fff;
}

.menu-item.logout-btn {
    color: #ff6b6b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 仪表盘内容 */
.dashboard-content {
    padding: 4rem 2rem;
    /*max-width: 1200px;*/
    margin: 0 2rem;
}

/* 账户概要 */
.account-summary {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 2fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* 确保所有卡片高度一致 */
.balance-card, .stat-card {
    height: auto;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.balance-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.balance-card h2, .stat-card h3 {
    margin: 0;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

.balance-amount, .stat-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #2196F3;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-family: Arial, sans-serif;
    text-align: left;
}

.uncounted-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b6b;
    text-align: right;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
}

.btn-primary {
    background-color: #028BBF;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    align-self: flex-start;
}

.btn-primary:hover {
    background-color: #028BBF;
}

.stats-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    width: 100%;
}

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
    min-width: calc((100% - 3rem) / 3); /* 默认三等分 */
}

/* 当未入账卡片隐藏时，调整其他卡片的宽度 */
#uncountedCard[style*="display: none"] ~ .stat-card {
    min-width: calc((100% - 1.5rem) / 2); /* 两等分 */
}

@media (max-width: 768px) {
    .stats-cards {
        flex-direction: column;
    }
    
    .stat-card {
        width: 100%;
        min-width: 100%;
    }
}

.stat-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 定价部分 */
.pricing-section {
    margin-bottom: 2rem;
}

.pricing-section h2 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.pricing-card {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pricing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pricing-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
}

.discount-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.pricing-card-body {
    /*flex: 1;*/
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.credits-display {
    font-size: 2rem;
    font-weight: bold;
    color: #028BBF;
    margin-bottom: 0.5rem;
}

.credits-unit {
    font-size: 1.1rem;
    font-weight: normal;
    color: #028BBF;
}



.pricing-badge {
    background: linear-gradient(135deg, #028BBF, #0277bd);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.pricing-card-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.price-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.current-price {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.original-price {
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
}

.btn-recharge {
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #028BBF, #0277bd);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-recharge:hover {
    background: linear-gradient(135deg, #0277bd, #01579b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 136, 209, 0.3);
}

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

/* 响应式调整 */
@media (max-width: 768px) {
    .pricing-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .pricing-card {
        padding: 1.2rem;
    }

    .credits-display {
        font-size: 1.6rem;
    }

    .current-price {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-section h2 {
        font-size: 1.3rem;
    }
}

/* 交易记录部分 */
.transactions-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.transactions-filter {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.5rem;
}

.transactions-filter select {
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent;
    padding-right: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    font-family: inherit;
}

.transactions-filter select:focus {
    outline: none;
}

.transactions-filter select option {
    font-size: 1rem;
    color: #333;
    background-color: white;
}

.transactions-list {
    border-top: 1px solid #eee;
}

.transaction-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-info {
    flex-grow: 1;
}

.transaction-date {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.transaction-description {
    font-size: 1rem;
    color: #333;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    min-width: 120px;
}

.transaction-amount {
    font-weight: bold;
    text-align: right;
}

.transaction-credits {
    font-size: 0.9rem;
    text-align: right;
}

.transaction-amount.positive,
.transaction-credits.positive {
    color: #4CAF50;
}

.transaction-credits.negative {
    color: #f44336;
}

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

.modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 充值选项样式 - 全局 */
.recharge-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
.recharge-option {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.recharge-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.recharge-option.selected {
    border-color: #028BBF;
    background-color: rgba(76, 175, 80, 0.1);
}
.recharge-option h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #ff6b6b;
}
.recharge-option .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #028BBF;
}
.recharge-option .credits {
    font-size: 1rem;
    color: #ff6b6b;
}
.recharge-note {
    margin-top: 12px;
    padding: 12px;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-size: 14px;
    color:red;
}

.recharge-note .regular-price {
    color: #000000;
    line-height: 1.6;
    margin-bottom: 10px;
}

.recharge-note .special-price {
    color: #ff0000;
    font-weight: 700;
    line-height: 1.6;
    font-size: 15px;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.modal-content .form-group {
    margin-bottom: 1.5rem;
}

.modal-content label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

#emailSubject, #emailMessage {
    color: #333;
}

#supportModal label {
    color: #333;
}

.modal-content input[type="number"],
.modal-content input[type="text"],
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    color: #333; /* 添加文本颜色 */
}

.modal-content input[type="number"]:focus,
.modal-content input[type="text"]:focus,
.modal-content textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.modal-content textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

#contactSupportBtn {
    margin-right: 15px;
    background-color: #2196F3;
}

#contactSupportBtn:hover {
    background-color: #1976D2;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 按钮样式 */
.btn-secondary {
    background-color: #757575;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #616161;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .account-summary {
        grid-template-columns: 1fr;
    }

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

    .dashboard-header .container {
        padding: 0 15px;
    }

    .dashboard-header h1 {
        font-size: 1.2rem;
    }

    .user-menu-trigger {
        padding: 6px;
    }

    #userEmail {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}

/* 分页控件 */
.transactions-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: rgb(145, 145, 145);
    cursor: pointer;
}
.pagination-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

.pagination-button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.pagination-button:hover:not(.active) {
    background-color: #f5f5f5;
    color: #333;
}

/* 支付相关样式 */
#qrCodeSection {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.payment-header {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.payment-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.payment-amount {
    margin-top: 15px;
    font-size: 28px;
    color: #ff6b6b;
    font-weight: bold;
}

.payment-qr-container {
    padding: 30px 20px;
    text-align: center;
    background-color: #fff;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.payment-instructions {
    margin: 20px 0;
    color: #666;
}

.credits-info {
    color: #028BBF;
    font-weight: bold;
    margin: 10px 0;
    font-size: 16px;
}

.payment-status {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
}

.status-spinner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #028BBF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.payment-footer {
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

.qr-note {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.recharge-note {
    white-space: pre-wrap;
}

.expire-icon {
    color: #ff6b6b;
}

#cancelPayment {
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cancelPayment:hover {
    background-color: #e9ecef;
    border-color: #c1c1c1;
}

.success-message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 9999;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .payment-qr-container {
        padding: 15px;
    }

    .qr-code {
        width: 180px;
        height: 180px;
    }

    .payment-amount {
        font-size: 24px;
    }

    .payment-instructions {
        font-size: 14px;
    }


    .recharge-options {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 20px;
    }
    @media (max-width: 576px) {
        .recharge-options {
            grid-template-columns: 1fr;
        }
    }
}