/* css/user.css */
/* 用户界面相关样式 */
.user-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem;
    min-height: 80vh;
    transition: opacity 0.3s ease;
}

.user-main::-webkit-scrollbar {
    width: 8px;
    background: var(--dark-1);
}

.user-main::-webkit-scrollbar-thumb {
    background: var(--blue-accent);
    border-radius: 0.25rem;
}

.user-sidebar {
    position: relative;
    background: var(--dark-2);
    border-radius: 0.25rem;
    padding: 1.5rem;
    border: 1px solid var(--gray-2);
    overflow: hidden;
}

.profile-card {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-edit {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border: 2px solid var(--blue-accent);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(204, 220, 245, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease;
    touch-action: manipulation;
    z-index: 1;
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter:
        drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
    z-index: 2;
}

.avatar-hover svg {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-linecap: round;
    stroke-linejoin: round;
    shape-rendering: geometricPrecision;
}

.avatar-edit:hover .avatar-hover {
    opacity: 1;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.stat-item {
    background: var(--dark-1);
    padding: 0.8rem;
    border-radius: 0.25rem;
    border: 1px solid var(--gray-1);
}

.stat-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-value {
    display: block;
    font-size: 1.4em;
    color: var(--blue-accent);
    font-weight: 600;
}

.user-menu {
    gap: 0.5rem;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.nav-item-user {
    display: none;
}

.menu-item {
    display: flex;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.25rem;
    background: transparent;
    transition: all 0.15s ease-out;
    box-shadow: 0 0 0 transparent;
    position: relative;
    font-size: 0.95em;
    color: #fff;
}

.menu-item svg {
    width: 18px;
    height: 18px;
    margin-right: 0.6rem;
    stroke-width: 2;
    stroke: #fff;
    fill: none;
}

.menu-item:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.menu-item:disabled {
    color: rgba(255, 255, 255, 0.5);
}

.menu-item.active {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.9);
}

.menu-item.active svg {
    stroke: #fff;
}

.menu-item.active::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 0.25rem;
    box-shadow: 0 0 12px var(--blue-accent);
    opacity: 0.3;
}

.menu-highlight {
    display: none;
    position: absolute;
    background: var(--blue-accent);
    height: 2px;
    bottom: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, transparent, var(--blue-accent) 50%);
    width: 3px;
    height: 100%;
    left: -8px;
}

.scroll-indicator {
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
    pointer-events: none;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    fill: var(--blue-accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.scrolling~.scroll-indicator .right-arrow {
    opacity: 1;
}

.user-main {
    position: relative;
    min-height: 500px;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.content-card {
    background: var(--dark-2);
    border: 1px solid var(--gray-2);
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease;
    min-width: 0;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.collection-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: var(--dark-1);
    border: 1px solid var(--gray-1);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.submission-card {
    padding: 1.2rem;
    background: var(--dark-1);
    border: 1px solid var(--gray-2);
    border-left: 3px solid var(--blue-accent);
    margin-bottom: 1rem;
}

.setting-card {
    position: relative;
    padding: 1rem;
    background: var(--dark-1);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.security-label {
    display: block;
    color: var(--blue-accent);
    font-size: 0.9em;
}

.security-value {
    font-size: 1.1em;
    color: var(--light);
}

.input-hint {
    font-size: 0.8em;
    color: var(--gray-2);
    margin-top: 0.5rem;
    display: none;
}

.input-group:focus-within .input-hint {
    display: block;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--blue-accent);
    cursor: pointer;
}

.password-strength {
    position: relative;
    margin-top: 0.5rem;
    height: 4px;
    background: var(--gray-1);
    border-radius: 0.25rem;
    overflow: hidden;
}

.strength-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7em;
    color: var(--gray-2);
    margin-top: 0.2rem;
}

.strength-bar {
    width: 33%;
    height: 100%;
    background: #ef4444;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.8em;
    color: var(--gray-2);
    margin-top: 0.2rem;
    display: block;
}

.two-factor-setup {
    display: grid;
    gap: 1.5rem;
    margin-top: 1rem;
}

.qrcode-container {
    width: 200px;
    height: 200px;
    background: white;
    padding: 1rem;
    margin: 0 auto;
}

.verification-code {
    display: flex;
    gap: 1rem;
    max-width: 300px;
    margin: 0 auto;
}

.backup-codes {
    background: var(--dark-1);
    padding: 1rem;
    border-radius: 0.25rem;
    margin-top: 1rem;
}

.codes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.button-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

.cyber-button.sending .button-text {
    visibility: hidden;
}

.cyber-button.sending .button-loader {
    display: block;
}

.char-counter {
    text-align: right;
    font-size: 0.8em;
    color: var(--gray-2);
    margin-top: 0.5rem;
}

.login-history {
    border-top: 1px solid var(--gray-2);
    padding-top: 1rem;
}

.login-item {
    padding: 0.8rem;
    background: var(--dark-2);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.login-time {
    color: var(--blue-accent);
    margin-right: 1rem;
}

.login-device {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-2);
}

.device-icon {
    width: 16px;
    height: 16px;
}

[data-strength="1"] .strength-bar {
    width: 33%;
    background: #ef4444;
}

[data-strength="2"] .strength-bar {
    width: 66%;
    background: #f59e0b;
}

[data-strength="3"] .strength-bar {
    width: 100%;
    background: #10b981;
}

[data-status="verified"] {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

[data-status="unverified"] {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.content-pane {
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.content-pane.active {
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition-delay: 0.1s;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.pane-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blue-accent);
}

.mini-card {
    background: var(--dark-1);
    border: 1px solid var(--gray-1);
    padding: 1rem;
    border-radius: 0.25rem;
    transition: transform 0.2s ease;
}

.mini-card:hover {
    transform: translateY(-3px);
}

.status-tag {
    font-size: 0.8em;
    padding: 0.2rem 0.6rem;
    border-radius: 0.25rem;
}

.status-published .status-tag {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.status-pending .status-tag {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.cyber-input.error {
    border-color: #ef4444;
    animation: shake 0.5s;
}

@media (max-width: 768px) {
    .user-menu {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0.5rem;
        padding: 8px 16px;
        margin-right: 8px;
        width: 100%;
    }
}