* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: #1f2937;
    min-height: 100vh;
    position: relative;
}

body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
    }
}

header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    color: #FF6B6B;
    font-size: 1.75rem;
}

.logo h1 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1D2129;
    letter-spacing: -0.02em;
}

nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-link {
    color: #4B5563;
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.nav-link:hover::before {
    width: 200%;
    height: 200%;
}

.nav-link:hover {
    color: #FF6B6B;
    background: rgba(255, 107, 107, 0.08);
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.flex {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

#userInfo {
    color: #4B5563;
    font-size: 0.9rem;
    font-weight: 500;
}

#logoutBtn {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 2rem;
    color: #374151;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#logoutBtn:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: #FF6B6B;
}

main {
    padding: 2.5rem 0;
}

section {
    margin-bottom: 2.5rem;
}

h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1D2129;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1D2129;
    margin-bottom: 0.75rem;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:hover::after {
    width: 300%;
    height: 300%;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #374151;
}

.btn-secondary:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
    color: #FF6B6B;
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF5252 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

th,
td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    background: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    color: #4B5563;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover {
    background: rgba(255, 107, 107, 0.03);
}

tr {
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input,
.form-group select {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    font-size: 0.9rem;
    color: #374151;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
}

footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content p {
    color: #6B7280;
    font-size: 0.875rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1D2129;
}

.close-btn {
    font-size: 2rem;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #FF6B6B;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

.loading-text {
    text-align: center;
    padding: 4rem;
    color: #6B7280;
    font-size: 1rem;
}

.spinner {
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    display: inline-block;
    margin-right: 0.75rem;
    color: #FF6B6B;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.empty-data {
    text-align: center;
    padding: 4rem;
    color: #6B7280;
    font-size: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.badge-warning {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
}

.badge-danger {
    background: rgba(255, 82, 82, 0.1);
    color: #FF5252;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

/* 未读消息数量小标样式 */
.unread-count {
    background: #EF4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
    min-width: 1.2rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        margin-top: 1rem;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-section {
        width: 100%;
        justify-content: flex-end;
    }

    .card {
        padding: 1.5rem;
    }

    main {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.15rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}