/* 认证组件基础样式 */
.auth-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 按钮样式 */
.auth-widget.logged-out,
.auth-widget-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-login,
.btn-register,
.btn-logout {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-login {
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
}

.btn-login:hover {
    border-color: #667eea;
    color: #667eea;
}

.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* 已登录状态 */
.auth-widget.logged-in .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.auth-widget.logged-in .user-name {
    font-size: 14px;
    color: #333;
}

.btn-logout {
    background: #f5f5f5;
    color: #666;
}

.btn-logout:hover {
    background: #e5e5e5;
}

/* 下拉菜单样式 */
.auth-widget-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.user-dropdown-btn:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.user-avatar-small {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.dropdown-arrow {
    width: 16px;
    height: 16px;
    fill: #666;
    transition: transform 0.3s;
}

.user-dropdown-btn:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f8f9ff;
}

.user-info-item {
    padding-bottom: 8px;
}

.user-info-item .user-name {
    font-weight: 600;
    font-size: 15px;
}

.user-info-item .user-email {
    font-size: 13px;
    color: #666;
}

.dropdown-divider {
    height: 1px;
    background: #e1e8ed;
    margin: 8px 0;
}

.btn-logout-dropdown {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #e53e3e;
    font-size: 14px;
}

.btn-logout-dropdown:hover {
    background: #fff5f5;
}

/* 响应式 */
@media (max-width: 768px) {
    .dropdown-menu {
        right: -100px;
        min-width: 200px;
    }
}
