* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* 背景图片样式 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../img/天气之子.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -2;
}

/* 背景遮罩层 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
}

/* 导入按钮样式 */
.import-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #27ae60, #219a52);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #219a52, #1e8449);
}

.import-btn:active {
    transform: translateY(0);
}

.import-icon {
    font-size: 16px;
}

/* 顶部导航栏样式 */
.top-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 5vh;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.user-info:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.user-phone {
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

.dropdown-icon {
    font-size: 10px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.user-info:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    border-bottom: 1px solid #f1f3f4;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 16px;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover {
    background: #f8f9fa;
    color: #007bff;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .user-info {
        padding: 10px 16px;
    }

    .dropdown-menu {
        position: absolute;
        /* 改为absolute定位 */
        top: 100%;
        /* 显示在用户信息下方 */
        left: 0;
        right: 0;
        margin-top: 8px;
        border-radius: 8px;
        transform: translateY(-10px);
        max-height: 50vh;
        overflow-y: auto;
        z-index: 1002;
    }

    .dropdown-menu.show {
        transform: translateY(0);
    }

    .dropdown-menu li a {
        padding: 16px 20px;
        font-size: 16px;
        text-align: center;
    }

    /* 移除遮罩层相关样式 */
    .dropdown-menu::before {
        display: none;
    }

    /* 移除下拉菜单关闭按钮 */
    .dropdown-menu::after {
        display: none;
    }
}

/* 确保下拉菜单在其他元素之上 */
.top-nav {
    position: relative;
    z-index: 1001;
}

.dropdown-menu {
    z-index: 1002;
}

/* 确保在超小屏幕上也能正常显示 */
@media (max-width: 480px) {
    .dropdown-menu {
        max-height: 60vh;
    }

    .dropdown-menu li a {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* 用户信息显示样式 */
.user-info .user-label {
    color: #6c757d;
    font-size: 12px;
}

.user-info .phone-number {
    font-weight: 600;
    color: #495057;
}

/* 桌面端悬停效果增强 */
@media (min-width: 769px) {
    .user-info {
        padding: 10px 20px;
    }

    .dropdown-menu {
        min-width: 200px;
    }

    .dropdown-menu li a {
        padding: 14px 20px;
    }

    .user-info:hover+.dropdown-menu,
    .dropdown-menu:hover {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* 动画效果 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    animation: slideDown 0.3s ease;
}

/* 移动端下拉菜单关闭按钮 */
@media (max-width: 768px) {
    .dropdown-menu::after {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #dee2e6;
        border-radius: 2px;
        margin: 8px auto;
    }
}

/* 确保下拉菜单在其他元素之上 */
.top-nav {
    position: relative;
    z-index: 1001;
}

.dropdown-menu {
    z-index: 1002;
}

/* 确保在超小屏幕上也能正常显示 */
@media (max-width: 480px) {
    .dropdown-menu {
        max-height: 60vh;
    }

    .dropdown-menu li a {
        padding: 14px 20px;
        font-size: 15px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 表单样式 */
#searchForm {
    margin-bottom: 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

/* 统一输入框样式 */
#selector,
#searchInput {
    width: 100%;
    /* 确保宽度一致 */
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
    /* 确保padding和border包含在宽度内 */
}

#selector:focus,
#searchInput:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
}

/* 确保select元素与input样式完全一致 */
#selector {
    appearance: none;
    /* 移除默认样式 */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
    /* 为下拉箭头留出空间 */
}

/* 移动端适配 */
@media (max-width: 768px) {

    #selector,
    #searchInput {
        padding: 14px 16px;
        font-size: 16px;
    }

    #selector {
        background-position: right 12px center;
        padding-right: 40px;
    }
}

/* 密码输入框也保持统一 */
.password-input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    /* 确保宽度计算一致 */
}

.password-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.search-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #2573a7);
}

.search-btn:active {
    transform: translateY(0);
}

/* 错误消息 */
.error-message {
    color: #e74c3c;
    margin: 15px 0;
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    display: none;
    font-size: 14px;
}

.error {
    border-color: #e74c3c !important;
}

/* 结果区域样式 */
#resultSection {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#resultTitle {
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: #2c3e50;
    text-align: center;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    display: none;
    font-size: 1.1rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

.result-list {
    list-style: none;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-list li {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.result-list li:last-child {
    border-bottom: none;
}

.result-list li:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.result-list li.header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 600;
    border-bottom: none;
}

.result-list li.header:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
}

.username {
    flex: 2;
    font-weight: 500;
}

.money {
    flex: 1;
    text-align: right;
    color: #27ae60;
    font-weight: 600;
    font-size: 1.1em;
}

.region {
    flex: 1;
    text-align: center;
    color: #666;
}

.empty-state,
.error-state {
    text-align: center;
    padding: 60px 40px;
    color: #666;
    display: none;
}

.empty-state p:first-child,
.error-state p:first-child {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.back-btn,
.new-search-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 120px;
}

.back-btn {
    background: #95a5a6;
    color: white;
}

.back-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.new-search-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.new-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}


/* 密码弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.password-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.show-password-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    font-size: 16px;
}

.show-password-btn:hover {
    color: #333;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.secondary-btn:hover {
    background: #5a6268;
}

.primary-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.primary-btn:hover {
    background: #0056b3;
}

.primary-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.pagination-container {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.pagination-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    color: #007bff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.page-btn:hover:not(:disabled) {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-btn:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #dee2e6;
}

.page-input-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.page-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.go-to-page {
    padding: 8px 12px;
    border: 1px solid #28a745;
    background: #28a745;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.go-to-page:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.modal-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding: 12px 45px 12px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.password-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.show-password-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    font-size: 16px;
}

.show-password-btn:hover {
    color: #333;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.secondary-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.secondary-btn:hover {
    background: #5a6268;
}

.primary-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.primary-btn:hover {
    background: #0056b3;
}

.primary-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pagination-controls {
        gap: 5px;
    }

    .page-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .page-input {
        width: 50px;
        padding: 6px;
    }

    .go-to-page {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .card,
    #resultSection {
        padding: 25px 20px;
        border-radius: 16px;
        margin: 10px;
    }

    h1 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    #resultTitle {
        font-size: 1.5rem;
    }

    .input-group {
        gap: 12px;
    }

    #selector,
    #searchInput {
        padding: 14px 16px;
        font-size: 16px;
    }

    .search-btn {
        padding: 14px;
    }

    .result-list li {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .result-list li.header {
        flex-direction: row;
    }

    .username,
    .money,
    .date {
        text-align: left;
        flex: none;
    }

    .money,
    .date {
        font-size: 0.9em;
        opacity: 0.8;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .back-btn,
    .new-search-btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* 移动端背景图片优化 */
    body::before {
        background-attachment: scroll;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .card,
    #resultSection {
        padding: 20px 15px;
    }

    h1 {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }

    #resultTitle {
        font-size: 1.3rem;
    }

    .empty-state,
    .error-state {
        padding: 40px 20px;
    }
}

/* 滚动条样式 */
#resultSection::-webkit-scrollbar {
    width: 6px;
}

#resultSection::-webkit-scrollbar-track {
    background: rgba(241, 241, 241, 0.5);
    border-radius: 3px;
}

#resultSection::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 3px;
}

#resultSection::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #2573a7);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
#resultSection {
    animation: fadeIn 0.6s ease-out;
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 背景图片加载时的备用样式 */
.no-bg-image body::before {
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 打印样式 */
@media print {

    body::before,
    body::after {
        display: none;
    }

    .card,
    #resultSection {
        background: white;
        box-shadow: none;
    }
}