:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --bg-soft: #f8fafc;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-soft: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

html {
    font-size: 15px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--text-main);
    background-color: var(--bg-soft);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.3px;
    font-weight: 700;
}

.brand-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bg-gradient-brand {
    background: var(--gradient-brand);
}

.btn-primary,
.btn-gradient {
    background: var(--gradient-brand);
    border: none;
    color: #fff;
    border-radius: 0.65rem;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover,
.btn-gradient:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.35);
}

.btn-outline-primary {
    color: var(--primary-dark);
    border-color: var(--primary);
    border-radius: 0.65rem;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--gradient-brand);
    border-color: transparent;
    color: #fff;
}

.hero {
    background: var(--gradient-soft);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 360px;
    height: 360px;
    background: var(--gradient-brand);
    border-radius: 50%;
    opacity: 0.08;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 260px;
    height: 260px;
    background: var(--gradient-brand);
    border-radius: 50%;
    opacity: 0.06;
}

.hero h1 {
    font-weight: 700;
    font-size: 2.4rem;
    color: var(--text-main);
    position: relative;
}

.search-box {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.search-box .form-control {
    border: 2px solid var(--border);
    border-radius: 999px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.search-box .btn {
    border-radius: 999px;
    padding: 0.85rem 2rem;
    font-weight: 600;
}

.user-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    height: 100%;
}

.user-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    border-color: #bfdbfe;
}

.user-card .region {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.resource-tag {
    display: inline-block;
    background: var(--gradient-soft);
    color: var(--primary-dark);
    border: 1px solid #dbeafe;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0.35rem 0.35rem 0;
}

.section-title {
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.auth-card {
    max-width: 420px;
    margin: 3rem auto;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}

.form-control {
    border-radius: 0.65rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.btn-outline-danger {
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

footer {
    margin-top: auto;
    background: #fff;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
}

a:hover {
    color: var(--primary);
}

/* 用户详情页 */
.profile-page {
    min-height: calc(100vh - 80px);
    background: var(--gradient-soft);
    padding: 2rem 0;
}

.profile-card {
    max-width: 680px;
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.profile-banner {
    height: 120px;
    background: var(--gradient-brand);
    position: relative;
}

.profile-banner::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 30px;
    background: #fff;
    border-top-left-radius: 1.25rem;
    border-top-right-radius: 1.25rem;
}

.avatar {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.avatar span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
}

.profile-body {
    padding: 3.75rem 2rem 2.5rem;
}

.profile-body .bio {
    max-width: 480px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem auto;
    max-width: 480px;
    text-align: left;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px dashed #e5e7eb;
    gap: 1rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.info-value {
    font-weight: 500;
    color: var(--text-main);
    text-align: right;
    word-break: break-all;
}

.resources-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.resources-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.title-bar {
    display: inline-block;
    width: 4px;
    height: 18px;
    background: var(--gradient-brand);
    border-radius: 2px;
}

.resource-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.resource-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.resource-pill:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
    transform: translateY(-1px);
}

.resource-pill .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-brand);
    flex-shrink: 0;
}

.resource-pill .name {
    font-weight: 500;
    color: var(--text-main);
}

.resource-pill .time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.empty-tip {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

@media (min-width: 576px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        border-bottom: none;
        border-right: 1px dashed #e5e7eb;
        padding: 0 1rem;
    }

    .info-item:last-child {
        border-right: none;
    }

    .info-value {
        text-align: left;
        margin-top: 0.25rem;
    }
}
