/* --- Global --- */
body {
    margin: 0;
    padding: 24px 16px;
    box-sizing: border-box;
    /* 允许纵向滚动，避免卡片内容（多语言、四个按钮、版权行）超出视口时底部「登录」被裁切无法点击 */
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
}

/* --- Card --- */
.card {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px 20px;
    width: 90%;
    max-width: 475px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    object-fit: cover;
    margin-top: 40px;
    margin-bottom: 15px;
    background-color: #ddd;
}

h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
    min-height: 40px;
    color: #222;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bio {
    font-size: 15px;
    color: #555;
    line-height: 1.5;
    padding: 0 10px;
    min-height: 90px;
    max-height: 90px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.social-links a {
    color: #333;
    font-size: 24px;
    transition: transform 0.2s, color 0.2s;
    text-decoration: none;
}

.social-links a:hover {
    color: #d8b4e2;
    transform: scale(1.1);
}

.social-links a.is-disabled,
.btn.is-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.noscript-site-pages {
    margin: 14px 0 0;
    padding: 12px 10px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.8125rem;
    line-height: 1.6;
    text-align: center;
}

.noscript-site-pages a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.noscript-site-pages a:hover {
    text-decoration: underline;
}

.noscript-site-pages__sep {
    margin: 0 6px;
    color: #94a3b8;
    font-weight: 400;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 50px;
    padding: 0 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn i {
    font-size: 0.95em;
    flex-shrink: 0;
    opacity: 0.9;
}

.btn__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
    border-color: #ccc;
}

.btn.is-disabled:hover {
    background-color: #fff;
    transform: none;
    border-color: #e0e0e0;
}

.copyright-row {
    margin-top: 16px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    z-index: 2;
}

.copyright-row::-webkit-scrollbar {
    display: none;
}

.copyright {
    margin: 0;
    padding: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.copyright-sep {
    color: #9ca3af;
    font-size: inherit;
    line-height: inherit;
    user-select: none;
    flex-shrink: 0;
}

.admin-login-link {
    flex-shrink: 0;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
    position: relative;
    z-index: 3;
    cursor: pointer;
}

.site-version {
    font-size: 11px;
    line-height: 1.2;
    color: #9ca3af;
    user-select: none;
}

.site-version-row {
    margin-top: 4px;
    text-align: center;
}

.admin-login-link:hover {
    color: #374151;
    border-bottom-color: #d1d5db;
}

/* --- Language switch --- */
.lang-switch {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: sans-serif;
    z-index: 100;
}

.lang-btn {
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: background 0.2s;
    backdrop-filter: blur(5px);
}

.lang-btn:focus-visible {
    outline: 2px solid #9c6acf;
    outline-offset: 2px;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.lang-btn i.fa-chevron-down {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s;
}

.lang-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    display: none;
    animation: fadeIn 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 101;
}

.lang-dropdown.show {
    display: block;
}

.dropdown-header {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    font-weight: 700;
}

.dropdown-divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 6px 12px;
}

.lang-item {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    transition: background 0.1s;
}

.lang-item:hover {
    background-color: #f5f5f5;
}

.lang-code {
    font-weight: 700;
    color: #666;
    margin-right: 10px;
    font-size: 13px;
}

.lang-name {
    flex-grow: 1;
    text-align: left;
}

.check-icon {
    color: #d8b4e2;
    opacity: 0;
}

.lang-item.active .check-icon {
    opacity: 1;
}

.lang-item.active {
    background-color: #f5f0fb;
}

.lang-item-content {
    display: flex;
    align-items: center;
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 28px;
    }
}
