* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

a {
    text-decoration: none;
}

.container {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 1200px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 48px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

input[type="text"], input[type="password"], input[type="email"] {
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    outline: none;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
    vertical-align: middle;
    width: 600px;
    height: 60px;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    border-color: #1253a3;
    box-shadow: 0 0 0 3px rgba(18, 83, 163, 0.1);
}

button {
    padding: 15px 30px;
    font-size: 16px;
    background: linear-gradient(135deg, #1253a3 0%, #1e3a8a 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    white-space: nowrap;
}

button:hover {
    background: linear-gradient(135deg, #0f4a8c 0%, #1a3276 100%);
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.table-container::-webkit-scrollbar {
    height: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #1253a3;
    border-radius: 10px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #0f4a8c;
}

table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

th {
    background: #1253a3;
    color: #fff;
    font-weight: normal;
    white-space: nowrap;
}

tr:nth-child(even) {
    background: #f9f9f9;
}

tr:hover {
    background: #e6f0ff;
}

.no-result {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    font-size: 16px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #1253a3;
    color: #fff;
    border-color: #1253a3;
}

.pagination .active {
    background: #1253a3;
    color: #fff;
    border-color: #1253a3;
}

.pagination .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .disabled:hover {
    background: transparent;
    color: #333;
    border-color: #ddd;
}

.search-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: stretch;
}

.search-container input[type="text"], .search-container input[type="password"], .search-container input[type="email"] {
    flex: 1;
    border-radius: 6px 0 0 6px;
    border: 2px solid #1253a3;
    border-right: none;
}

.search-container input[type="text"]:focus, .search-container input[type="password"]:focus, .search-container input[type="email"]:focus {
    box-shadow: none;
}

.search-button {
    padding: 10px 35px;
    background: linear-gradient(135deg, #1253a3 0%, #1e3a8a 100%);
    color: #fff;
    border: 2px solid #1253a3;
    border-left: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 32px;
    transition: background 0.3s;
    box-sizing: border-box;
    vertical-align: middle;
    height: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.search-button:hover {
    background: linear-gradient(135deg, #0f4a8c 0%, #1a3276 100%);
    border-color: #0f4a8c;
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 200px;
    overflow: hidden;
}

#suggestions div {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

#suggestions div:hover,
#suggestions div.active {
    background: #e6f0ff;
    color: #333;
}

.footer {
    text-align: center;
    color: #999;
    font-size: 14px;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
    z-index: 1000;
}

.footer a {
    color: inherit;
    text-decoration: none;
}

/* 认证页面样式 */
.auth-container {
    width: 600px;
    margin: 50px auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #1253a3, #1e3a8a);
}

.auth-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.auth-form .form-group {
    margin-bottom: 25px;
    position: relative;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form .form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #1253a3;
    box-shadow: 0 0 0 3px rgba(18, 83, 163, 0.1);
    background: #fff;
}

.auth-form .form-group input[readonly] {
    background: #f0f0f0;
    cursor: not-allowed;
    border-color: #ddd;
}

.auth-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1253a3 0%, #1e3a8a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-button:hover {
    background: linear-gradient(135deg, #0f4a8c 0%, #1a3276 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 83, 163, 0.3);
}

.auth-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-link {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.auth-link a {
    color: #1253a3;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: #0f4a8c;
    text-decoration: none;
}

.auth-message {
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 顶部导航栏样式 */
.top-nav {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
}

.top-nav-left {
    display: flex;
    align-items: center;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: #1253a3;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #0f4a8c;
    background: rgba(18, 83, 163, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    background: #1253a3;
    color: #fff;
}

.nav-separator {
    color: #ccc;
    margin: 0 10px;
}

/* 登录弹窗样式 */
.login-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.login-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    position: relative;
}

.login-modal-content .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.login-modal-content .close:hover,
.login-modal-content .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* 通知窗口样式 */
.notification-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.notification-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.notification-modal-content h3 {
    color: #1253a3;
    margin-bottom: 20px;
    font-size: 20px;
}

.notification-modal-content p {
    margin-bottom: 30px;
    line-height: 1.5;
    white-space: pre-line;
    text-align: left;
}

.notification-modal-content p strong {
    color: #d32f2f;
}

.notification-modal-content p a {
    color: #1253a3;
    text-decoration: underline;
}

.notification-modal-content .btn {
    padding: 10px 20px;
    background: #1253a3;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.notification-modal-content .btn:hover {
    background: #0f4a8c;
}

/* 权限通过提醒窗口样式 */
.permission-granted-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.permission-granted-content {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    margin: 15% auto;
    padding: 40px;
    border: 2px solid #22c55e;
    width: 80%;
    max-width: 450px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: slideUp 0.4s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.permission-granted-content .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.permission-granted-content .success-icon i {
    color: white;
    font-size: 40px;
}

.permission-granted-content h3 {
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
}

.permission-granted-content p {
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.6;
    font-size: 15px;
}

.permission-granted-content .btn-success {
    padding: 12px 30px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.permission-granted-content .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info a {
    color: #1253a3;
    text-decoration: none;
}

.user-info a:hover {
    text-decoration: none;
}

.btn-login, .btn-register {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.btn-login {
    background: #1253a3;
    color: #fff;
}

.btn-register {
    background: #6c757d;
    color: #fff;
}

/* 滚动公告动画 */
@keyframes scroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.announcement-container {
    margin: 20px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.announcement-content {
    white-space: nowrap;
    animation: scroll 30s linear infinite;
}

.announcement-content span:first-child {
    color: #dc3545;
    font-weight: bold;
}

.announcement-container:hover .announcement-content {
    animation-play-state: paused;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-container {
        padding: 30px 20px;
    }
    
    .auth-container h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .auth-form .form-group {
        margin-bottom: 20px;
    }
    
    .auth-form .form-group input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .auth-button {
        padding: 12px;
        font-size: 14px;
    }
    
    .top-nav {
        padding: 0 20px;
    }
    
    .top-nav-right {
        gap: 10px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 14px;
        transition: none;
    }
    
    .nav-link:hover {
        transform: none;
        background: none;
        color: #1253a3;
    }
    
    .nav-link.active:hover {
        background: #1253a3;
        color: #fff;
    }

    .login-modal-content,
    .notification-modal-content,
    .permission-granted-content {
        width: 90%;
        margin: 20% auto;
        padding: 20px;
    }

    .permission-granted-content {
        padding: 30px 20px;
    }

    .permission-granted-content .success-icon {
        width: 60px;
        height: 60px;
    }

    .permission-granted-content .success-icon i {
        font-size: 30px;
    }

    .permission-granted-content h3 {
        font-size: 20px;
    }

    .permission-granted-content p {
        font-size: 14px;
    }

    #price-permission-modal .notification-modal-content {
        width: 95%;
        padding: 20px 15px;
    }

    #price-permission-modal h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    #price-permission-modal input {
        padding: 12px 15px;
        font-size: 14px;
    }

    #customer-service-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .login-modal-content,
    .notification-modal-content {
        width: 95%;
        padding: 15px;
    }

    .login-modal-content h2 {
        font-size: 18px;
    }

    .btn-login, .btn-register {
        padding: 8px 16px;
        font-size: 13px;
    }

    .permission-granted-content {
        padding: 25px 15px;
    }

    .permission-granted-content h3 {
        font-size: 18px;
    }

    #price-permission-modal .notification-modal-content {
        padding: 15px 10px;
    }

    #price-permission-modal h3 {
        font-size: 18px;
    }
}

/* 移动端样式 */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }

    .container {
        padding: 15px;
        padding-bottom: 80px;
        border-radius: 8px;
    }

    .top-nav {
        top: 10px;
        padding: 0 10px;
        position: relative;
        margin-bottom: 10px;
    }

    h1 {
        font-size: 32px;
        margin-bottom: 20px;
        margin-top: 60px;
    }

    .search-box {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .search-container {
        width: 100%;
        max-width: 100%;
    }

    input[type="text"], input[type="password"], input[type="email"] {
        width: 100%;
        min-width: unset;
        height: 50px;
        font-size: 14px;
    }

    .search-button {
        width: auto;
        min-width: 80px;
        padding: 12px 15px;
        font-size: 18px;
    }

    .table-container {
        margin-top: 15px;
        border-radius: 6px;
    }

    table {
        min-width: 600px;
    }

    th, td {
        padding: 8px 6px;
        font-size: 12px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 5px;
        margin-top: 20px;
    }

    .pagination a {
        padding: 6px 10px;
        font-size: 13px;
    }

    .announcement-container {
        margin: 15px 0;
        padding: 8px;
    }

    .footer {
        font-size: 12px;
        padding: 10px;
    }
}

/* 小屏幕手机适配 */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        padding: 10px;
        padding-bottom: 80px;
        border-radius: 6px;
    }

    h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .top-nav {
        padding: 0 5px;
    }

    .nav-link {
        padding: 5px 10px;
        font-size: 13px;
    }

    input[type="text"], input[type="password"], input[type="email"] {
        height: 55px;
        padding: 10px 15px;
        font-size: 14px;
    }

    .search-button {
        padding: 6px 6px 6px 6px;
        font-size: 26px;
    }

    th, td {
        padding: 6px 4px;
        font-size: 11px;
    }

    .pagination a {
        padding: 5px 8px;
        font-size: 12px;
    }
}