/* 应用容器宽度控制 */
.app-container {
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .app-container {
        max-width: 640px;
        padding: 0 15px;
    }
}

@media (min-width: 768px) {
    .app-container {
        max-width: 720px;
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 960px;
    }
}

/* 购买记录部分样式 - 移动版体育网站个人中心 */

/* 记录筛选区域 */
.records-filter-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
    background-color: #fff;
    border-radius: 12px;
    margin: 14px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

@media (min-width: 640px) {
    .records-filter-section {
        padding: 16px 18px;
    }
}

/* 日期筛选器 */
.date-filter {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

@media (max-width: 640px) {
    .date-filter {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .filter-label {
        display: none;
    }
}

.filter-label {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-weight: 500;
}

.date-input-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.date-input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
}

@media (max-width: 360px) {
    .date-input {
        padding: 10px 8px;
        font-size: 12px;
    }
}

.date-separator {
    margin: 0 6px;
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.search-button {
    background-color: #1e40af;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
    margin-left: 8px;
}

@media (max-width: 400px) {
    .search-button {
        padding: 10px 12px;
        min-width: 70px;
    }
    
    .search-button i {
        margin-right: 0;
    }
    
    .search-button span {
        display: none;
    }
}

.search-button:hover {
    background-color: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 64, 175, 0.3);
}

.search-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* 记录类型筛选下拉菜单 */
.filter-dropdown {
    position: relative;
    z-index: 20;
    width: 100%;
    margin-top: 10px;
}

@media (min-width: 640px) {
    .filter-dropdown {
        width: auto;
        margin-top: 0;
    }
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    user-select: none;
}

@media (min-width: 640px) {
    .dropdown-trigger {
        width: 140px;
    }
}

.dropdown-trigger span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.dropdown-trigger i {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
}

.dropdown-trigger.active i {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 20;
    margin-top: 6px;
    display: none;
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 300px;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .dropdown-content {
        width: 160px;
        left: auto;
        right: 0;
    }
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f0f7ff;
}

.dropdown-item.active {
    background-color: rgba(30, 64, 175, 0.1);
    color: #1e40af;
    font-weight: 500;
}

/* 购买记录表格 */
.purchase-records-table {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    width: 100%;
    transition: all 0.3s ease;
}

.records-table-header {
    display: flex;
    background-color: #f5f7fa;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #edf0f5;
    transition: all 0.3s ease;
}

.records-table-body {
    max-height: 600px;
    overflow-y: auto;
}

.record-row {
    display: flex;
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f5;
    transition: all 0.3s ease;
    align-items: center;
    cursor: pointer;
}

.record-row:last-child {
    border-bottom: none;
}

.record-row:hover {
    background-color: #f8fafd;
}

.record-row:active {
    background-color: #f0f7ff;
    transform: translateY(1px);
}

.record-column {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
    overflow: hidden;
}

.record-rank {
    width: 28px;
    flex-shrink: 0;
    justify-content: center;
    padding-right: 4px;
}

.record-date {
    width: 110px;
    flex-shrink: 0;
    padding-left: 0;
    color: #666;
    padding-right: 10px;
    font-size: 13px;
}

@media (max-width: 480px) {
    .record-date {
        width: 86px;
        font-size: 12px;
    }
}

.record-purpose {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
}

.record-amount-balance {
    width: 85px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 3px;
}

.record-amount {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-align: right;
    width: 100%;
}

.record-amount.negative {
    color: #e53e3e;
}

.record-balance {
    color: #ff6b00;
    font-weight: 500;
    font-size: 12px;
    text-align: right;
    width: 100%;
}

@media (max-width: 480px) {
    .record-amount {
        font-size: 13px;
    }
    
    .record-balance {
        font-size: 11px;
    }
}

/* 序号样式 */
.rank-number {
    width: 22px;
    height: 22px;
    background-color: #1e40af;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* 移除前三名的特殊样式 */
/* 
.rank-number.rank-1 {
    background-color: #f59e0b;
}

.rank-number.rank-2 {
    background-color: #9ca3af;
}

.rank-number.rank-3 {
    background-color: #d97706;
} 
*/

.record-link {
    color: #1e40af;
    text-decoration: none;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    transition: color 0.2s ease;
    font-weight: 500;
    font-size: 13px;
    line-height: 1.4;
}

.record-link:hover {
    color: #ff6b00;
    text-decoration: none;
}

@media (max-width: 480px) {
    .record-link {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .record-rank {
        width: 26px;
    }
    
    .rank-number {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }
}

/* 加载更多按钮 */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
}

.load-more-button {
    background-color: #f0f7ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    font-weight: 500;
}

.load-more-button:hover {
    background-color: #dbeafe;
    border-color: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(30, 64, 175, 0.2);
}

.load-more-button:active {
    transform: translateY(0);
    box-shadow: none;
}

.load-more-button i {
    font-size: 14px;
}

/* 空状态提示 */
.records-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 36px;
    color: #ccc;
    margin-bottom: 12px;
}

.empty-state-text {
    font-size: 14px;
    color: #999;
    line-height: 1.4;
}

body[data-theme="dark"] .empty-state-icon {
    color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .empty-state-text {
    color: rgba(255, 255, 255, 0.5);
}

/* Toast 提示样式 */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(51, 51, 51, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    text-align: center;
}

.toast-message.error {
    background-color: rgba(244, 67, 54, 0.9);
}

.toast-message.success {
    background-color: rgba(46, 125, 50, 0.9);
}

body[data-theme="dark"] .toast-message {
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .toast-message.error {
    background-color: rgba(183, 28, 28, 0.9);
}

body[data-theme="dark"] .toast-message.success {
    background-color: rgba(27, 94, 32, 0.9);
}

/* 暗色模式适配 */
body[data-theme="dark"] .records-filter-section {
    background-color: #1e3799;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .filter-label {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .date-input {
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .date-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

body[data-theme="dark"] .date-separator {
    color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .search-button {
    background-color: #3b82f6;
}

body[data-theme="dark"] .search-button:hover {
    background-color: #2563eb;
}

body[data-theme="dark"] .dropdown-trigger {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

body[data-theme="dark"] .dropdown-trigger span {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .dropdown-trigger i {
    color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .dropdown-content {
    background-color: #1e3799;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body[data-theme="dark"] .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] .dropdown-item.active {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

body[data-theme="dark"] .purchase-records-table {
    background-color: #1e3799;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .records-table-header {
    background-color: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .record-row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .record-row:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="dark"] .record-column {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .record-date {
    color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .record-amount {
    color: rgba(255, 255, 255, 0.9);
}

body[data-theme="dark"] .record-amount.negative {
    color: #f87171;
}

body[data-theme="dark"] .record-balance {
    color: #f87171;
}

body[data-theme="dark"] .rank-number {
    background-color: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

body[data-theme="dark"] .record-link {
    color: #60a5fa;
}

body[data-theme="dark"] .record-link:hover {
    color: #f87171;
}

body[data-theme="dark"] .load-more-button {
    background-color: rgba(30, 64, 175, 0.2);
    border-color: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

body[data-theme="dark"] .load-more-button:hover {
    background-color: rgba(30, 64, 175, 0.3);
    border-color: rgba(96, 165, 250, 0.4);
} 