/* ==================== 用户中心样式 ==================== */

.user-hero {
    padding: 120px 0 80px;
    background: var(--bg-secondary);
    min-height: 100vh;
}

.user-container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 22px;
}

.page-title {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.07;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text-primary);
}

.user-card {
    background: var(--tile-bg);
    border-radius: 18px;
    padding: 36px 40px;
    border: 1px solid var(--nav-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 32px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0071e3 0%, #00c7be 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 113, 227, 0.25);
}

.avatar-icon {
    font-size: 36px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.username {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.email {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.user-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.meta-item {
    font-size: 13px;
}

.meta-label {
    color: var(--text-tertiary);
}

.meta-value {
    color: var(--text-primary);
    font-weight: 500;
}

.logout-btn {
    padding: 10px 24px;
    background: rgba(255, 59, 48, 0.12);
    border: 1px solid rgba(255, 59, 48, 0.2);
    border-radius: 980px;
    color: #ff3b30;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: inherit;
}

.logout-btn:hover {
    background: rgba(255, 59, 48, 0.18);
    border-color: rgba(255, 59, 48, 0.3);
}

.history-section {
    background: var(--tile-bg);
    border-radius: 18px;
    padding: 36px 40px;
    border: 1px solid var(--nav-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 32px;
}

.suggestions-section {
    background: var(--tile-bg);
    border-radius: 18px;
    padding: 36px 40px;
    border: 1px solid var(--nav-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: -20px;
    margin-bottom: 24px;
}

.btn-new {
    padding: 10px 22px;
    background: var(--accent-blue);
    border-radius: 980px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-new:hover {
    background: var(--accent-blue-hover);
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-state .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-secondary);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 15px;
}

.empty-state .btn-primary {
    padding: 12px 28px;
    background: var(--accent-blue);
    border-radius: 980px;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
}

.empty-state .btn-primary:hover {
    background: var(--accent-blue-hover);
}

.history-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--nav-border);
}

.history-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    background: var(--bg-secondary);
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.history-table tbody tr:hover td {
    background: rgba(0, 113, 227, 0.04);
}

.history-table td {
    color: var(--text-primary);
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
}

.status-pending {
    background: rgba(255, 149, 0, 0.12);
    color: #ff9500;
}

.status-punished {
    background: rgba(255, 59, 48, 0.12);
    color: #ff3b30;
}

.status-accepted {
    background: rgba(52, 199, 89, 0.12);
    color: #34c759;
}

.status-no-action {
    background: rgba(142, 142, 147, 0.12);
    color: #8e8e93;
}

.status-cancelled {
    background: rgba(175, 82, 222, 0.12);
    color: #af52de;
}

.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(0, 113, 227, 0.12);
    color: var(--accent-blue);
}

.delete-btn {
    padding: 6px 14px;
    background: rgba(255, 59, 48, 0.12);
    border: none;
    border-radius: 980px;
    color: #ff3b30;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.delete-btn:hover {
    background: rgba(255, 59, 48, 0.2);
}

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

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal-content {
    background: var(--tile-bg);
    border-radius: 18px;
    padding: 28px;
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--nav-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
    font-size: 15px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel {
    padding: 10px 22px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 980px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-cancel:hover {
    background: var(--tile-hover-bg);
    color: var(--text-primary);
}

.btn-confirm {
    padding: 10px 22px;
    background: #ff3b30;
    border: none;
    border-radius: 980px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-confirm:hover {
    background: #ff453a;
}

.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10001;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--tile-bg);
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--nav-border);
    min-width: 280px;
}

.notification.success .notification-content {
    border-color: rgba(52, 199, 89, 0.3);
}

.notification.error .notification-content {
    border-color: rgba(255, 59, 48, 0.3);
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    color: #34c759;
}

.notification.error .notification-icon {
    color: #ff3b30;
}

.notification-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 14px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.notification-close:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

.suggestion-form input,
.suggestion-form textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.suggestion-form input:focus,
.suggestion-form textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.suggestion-form .btn-primary {
    align-self: flex-start;
    padding: 12px 28px;
    background: var(--accent-blue);
    border: none;
    border-radius: 980px;
    color: white;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.suggestion-form .btn-primary:hover {
    background: var(--accent-blue-hover);
}

.suggestion-form .btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.suggestions-list h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--nav-border);
}

.suggestion-item {
    background: var(--bg-secondary);
    border: 1px solid var(--nav-border);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: border-color 0.2s ease;
}

.suggestion-item:hover {
    border-color: var(--text-tertiary);
}

.suggestion-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 12px;
}

.suggestion-item-header strong {
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
}

.suggestion-time {
    color: var(--text-tertiary);
    font-size: 13px;
    white-space: nowrap;
}

.suggestion-item-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.stars-container,
.hero-particles {
    display: none;
}

@media (max-width: 768px) {
    .user-hero {
        padding: 100px 0 60px;
    }

    .page-title {
        font-size: 36px;
    }

    .user-card {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
    }

    .user-avatar {
        width: 72px;
        height: 72px;
    }

    .avatar-icon {
        font-size: 32px;
    }

    .username {
        font-size: 24px;
    }

    .user-meta {
        justify-content: center;
    }

    .logout-btn {
        width: 100%;
        margin-top: 8px;
    }

    .history-section,
    .suggestions-section {
        padding: 28px 24px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-table th,
    .history-table td {
        padding: 12px 14px;
        font-size: 13px;
    }

    .status-badge,
    .type-badge {
        padding: 3px 10px;
        font-size: 12px;
    }

    .delete-btn {
        padding: 5px 12px;
        font-size: 12px;
    }

    .notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }

    .notification-content {
        min-width: auto;
    }

    .modal-content {
        padding: 24px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-confirm {
        width: 100%;
    }

    .suggestions-section {
        padding: 28px 24px;
    }

    .suggestion-form .btn-primary {
        width: 100%;
        text-align: center;
    }

    .suggestion-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .user-container {
        padding: 0 16px;
    }

    .page-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .user-card {
        padding: 24px 20px;
    }

    .history-section,
    .suggestions-section {
        padding: 24px 20px;
    }

    .history-table th,
    .history-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
}
